mslices

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[T any](ar []T, keep func(val T) bool) []T

Filter filters items using the keep function @return return new array with filtered values

func Unique

func Unique[T comparable](ar []T) []T

Unique remove duplicated values from array @return new table with unique values

Types

type SliceOfFlag

type SliceOfFlag[T any] []T

SliceOfFlag array support for variables in program flags np. var list sliceOfFlag[string] flag.Var(&list, "item", "additional items")

func (*SliceOfFlag[T]) Set

func (i *SliceOfFlag[T]) Set(value T) error

Set is an implementation of the flag.Value interface

func (*SliceOfFlag[T]) String

func (i *SliceOfFlag[T]) String() string

String is an implementation of the flag.Value interface

Jump to

Keyboard shortcuts

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