slices

package
v0.0.0-...-a89fe16 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

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