functional

package
v0.0.0-...-d7985ca Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterMap

func FilterMap[K comparable, V any](m map[K]V, f func(K, V) bool) map[K]V

func HasAnyPrefix

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

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

func ResolveOptions

func ResolveOptions[T any](opts ...Option[T]) T

func SplitCommaSeparatedString

func SplitCommaSeparatedString(value string) []string

SplitCommaSeparatedString splits a string by commas, removes whitespace, and returns a slice of strings

func Unmarshal

func Unmarshal[T any](raw []byte) (*T, error)

Types

type Option

type Option[T any] func(T) T

type Pair

type Pair[A, B any] struct {
	First  A
	Second B
}

Jump to

Keyboard shortcuts

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