ziter

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: MIT Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

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