Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrValueNotSlice = errors.New("value is not a slice")
)
Functions ¶
func InterfaceToSlice ¶
func InterfaceToSlice(input interface{}) (slice []interface{}, err error)
Convert interface{} into []interface{} if the input is a slice, otherwise, return an error.
func WithChunks ¶
func WithChunks(items interface{}, size int, handler ChunkHandler) error
Break a slice into multiple slices of the provided size
Types ¶
type ChunkHandler ¶
type ChunkHandler func(chunk []interface{}) error
Click to show internal directories.
Click to hide internal directories.