slices

package
v0.71.2 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 0 Imported by: 39

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map added in v0.69.0

func Map[T, U any](collection []T, transform func(item T) U) []U

Map manipulates a slice and transforms it to a slice of another type. Unlike lo.Map, the transform function doesn't receive an index argument.

func ZeroToNil

func ZeroToNil[T any](t []T) []T

ZeroToNil returns nil, if slice is empty

Types

This section is empty.

Jump to

Keyboard shortcuts

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