Documentation
¶
Index ¶
- func Chunk[T any](slice []T, chunkSize int) [][]T
- func Contains[T Ordered](slice *[]T, v T) bool
- func GetOrDefault(s *string, defaultValue string) string
- func HashMap[T any](slice *[]T, keyField string) (map[interface{}]T, error)
- func Percent[T Numbers, E Numbers](percent T, all E) float64
- func PercentOf[T Numbers, E Numbers](part T, total E) float64
- func ResizeImage(image image.Image, width, height int) image.Image
- type Float
- type Integer
- type Numbers
- type Ordered
- type Signed
- type Unsigned
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrDefault ¶
GetOrDefault returns the value of the given string pointer if it is not nil, otherwise it returns the provided default value.
Types ¶
Click to show internal directories.
Click to hide internal directories.