sliceutil

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package sliceutil contains utility functions for working with slices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map[X any, Y any](xs []X, f func(X) Y) []Y

Map converts a slice of one object into another using a function

func MapErr

func MapErr[X any, Y any](xs []X, f func(X) (Y, error)) ([]Y, error)

MapErr cnverts a slice of one object into another using a function that returns an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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