cast

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2020 License: Apache-2.0, MIT Imports: 1 Imported by: 0

Documentation

Overview

Package cast provides casting for sparse and dense arrays.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DenseCollectionToInterface

func DenseCollectionToInterface(elms []interface{}) (interface{}, error)

DenseCollectionToInterface casts a slice of interfaces to an interface of the correct type.

func SparseCollectionToInterface

func SparseCollectionToInterface(elms []interface{}, indexes []int, size int) (interface{}, error)

SparseCollectionToInterface casts a slice of interfaces to an interface of the correct type for the provided sparse collection. This should be used for sparse as it should be faster for larger arrays.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL