utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keys

func Keys[T comparable, V any](store map[T]V) []T

func Quote

func Quote(value string, q rune) string

func QuoteBuilder

func QuoteBuilder(out interface{ WriteRune(rune) (int, error) }, value string, q rune)

func TemplateFuncs

func TemplateFuncs() template.FuncMap

func Uniq

func Uniq[T comparable](values []T) []T

Types

type Set

type Set[T comparable] map[T]struct{}

func NewSet

func NewSet[T comparable](values ...T) Set[T]

func (Set[T]) Add

func (s Set[T]) Add(values ...T)

func (Set[T]) Has

func (s Set[T]) Has(values ...T) bool

Jump to

Keyboard shortcuts

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