functional

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(strings []string, candidate string) bool

func HasAnyPrefix

func HasAnyPrefix(s string, prefixes ...string) bool

HasAnyPrefix returns true if any of the provided prefixes match the given string s

func IntersectStringSlice

func IntersectStringSlice(slices ...[]string) []string

IntersectStringSlice takes the intersection of the slices. Semantically: 1. [],[a,b] -> []: Empty set will always result in [] 2. nil,[a,b] -> [a,b]: Nil is the universal set and does not constrain 3. ([a,b],[b]) -> [b]: Takes the intersection of the two sets

func StringSliceWithout

func StringSliceWithout(vals []string, remove ...string) []string

func UnionStringMaps

func UnionStringMaps(maps ...map[string]string) map[string]string

UnionStringMaps merges all key value pairs into a single map, last write wins.

func UniqueStrings

func UniqueStrings(strings []string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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