flat

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Interfaces

func Interfaces(items ...interface{}) []interface{}

Interfaces returns the items values as a slice of interface{}. Nested Slice items are flattened.

func Len

func Len(items []interface{}) (int, bool)

Len returns the number of items contained in items. Nested Slice items are counted as if they are flattened. It returns true if at least one Slice item is found, false otherwise.

func Values

func Values(items []interface{}) []reflect.Value

Values returns the items values as a slice of reflect.Value. Nested Slice items are flattened.

Types

type Slice

type Slice struct {
	Slice interface{}
}

Slice allows to flatten any slice, array or map.

Jump to

Keyboard shortcuts

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