slices

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2022 License: MIT Imports: 1 Imported by: 0

README

slices

Generated code of common slice operations based on standard go types.

  • Split[X] splits a slice into parts of a given length, with a remainder if necessary.
  • Convert[X]ToInterface converts a slice of one type to a slice of interface{}.
  • Append[X]ToInterface appends the contents of a slice to a slice of interface{}.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendInt64ToAny added in v0.1.0

func AppendInt64ToAny(dst []any, src ...int64) []any

AppendInt64ToAny generics helper.

func AppendIntToAny added in v0.1.0

func AppendIntToAny(dst []any, src ...int) []any

AppendIntToAny generics helper.

func AppendSourceToAny added in v0.1.0

func AppendSourceToAny(dst []any, src ...Source) []any

AppendSourceToAny generics helper.

func AppendStringToAny added in v0.1.0

func AppendStringToAny(dst []any, src ...string) []any

AppendStringToAny generics helper.

func AppendUint64ToAny added in v0.1.0

func AppendUint64ToAny(dst []any, src ...uint64) []any

AppendUint64ToAny generics helper.

func ConvertInt64ToAny added in v0.1.0

func ConvertInt64ToAny(src []int64) []any

ConvertInt64ToAny generics helper.

func ConvertIntToAny added in v0.1.0

func ConvertIntToAny(src []int) []any

ConvertIntToAny generics helper.

func ConvertSourceToAny added in v0.1.0

func ConvertSourceToAny(src []Source) []any

ConvertSourceToAny generics helper.

func ConvertStringToAny added in v0.1.0

func ConvertStringToAny(src []string) []any

ConvertStringToAny generics helper.

func ConvertUint64ToAny added in v0.1.0

func ConvertUint64ToAny(src []uint64) []any

ConvertUint64ToAny generics helper.

func SplitInt

func SplitInt(src []int, partLen int) [][]int

SplitInt splits a slice into parts of a given length, with a remainder if necessary.

func SplitInt64

func SplitInt64(src []int64, partLen int) [][]int64

SplitInt64 splits a slice into parts of a given length, with a remainder if necessary.

func SplitSlice

func SplitSlice(src []Slice, partLen int) [][]Slice

SplitSlice splits a slice into parts of a given length, with a remainder if necessary.

func SplitString

func SplitString(src []string, partLen int) [][]string

SplitString splits a slice into parts of a given length, with a remainder if necessary.

func SplitUint64

func SplitUint64(src []uint64, partLen int) [][]uint64

SplitUint64 splits a slice into parts of a given length, with a remainder if necessary.

Types

type Slice

type Slice generic.Type

type Source

type Source generic.Type

Jump to

Keyboard shortcuts

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