Documentation ¶
Index ¶
- func Chunk[K comparable](slice []K, batchSize int) [][]K
- func DoesSliceContain(dataSlice []string, toCompare string) bool
- func GetEnvDefault(key string, def string) (result string)
- func PickField[K interface{}, V comparable](iterator []K, returner func(K) V) (result []V)
- type Writer
- type WriterOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chunk ¶
func Chunk[K comparable](slice []K, batchSize int) [][]K
FIXME: move to barelyhuman/go package Chunk - create batches of an arbitrary typed slice into the given batch size
func DoesSliceContain ¶
DoesSliceContain - check if a string slice contains a given string
func GetEnvDefault ¶
func PickField ¶
func PickField[K interface{}, V comparable](iterator []K, returner func(K) V) (result []V)
FIXME: move to barelyhuman/go package PickField - pick the value of a particular field from a slice into it's own slice
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func NewWriter ¶
func NewWriter( options ...WriterOptions, ) *Writer
type WriterOptions ¶
type WriterOptions func(w *Writer)
func WithSilent ¶
func WithSilent(silent bool) WriterOptions
Click to show internal directories.
Click to hide internal directories.