slice

package
v0.0.0-...-21d0996 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(slice []string, val string) bool

Contains return true/false if an element is in a slice or not

func Filter

func Filter[T comparable](slice []T, conditions ...func(T) bool) []T

Filter - filter slice by conditions

@param slice - slice to filter
@param conditions - conditions to filter by (array of functions)
@return []T - filtered slice

func Remove

func Remove[T comparable](l []T, item T) []T

Remove element by value from slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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