slices

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert[T any, R comparable](slice []T, f func(in T) R) []R

Convert accepts a list of T and returns a list of R based on the input func.

func ConvertErr

func ConvertErr[T any, R comparable](slice []T, f func(in T) (R, error)) ([]R, error)

ConvertErr is a variant of Convert that also escapes if there's an error converting the item T into R.

Types

This section is empty.

Jump to

Keyboard shortcuts

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