util

package
v0.0.0-...-bde300a Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Appends

func Appends(pre string, names []string) []string

func Equal

func Equal[E, A interface{ string | int }](t *testing.T, expected E, actual A)

func Filter

func Filter[T any](ss []T, test func(T) bool) (ret []T)

func Find

func Find(t *testing.T, needle string, source string)

func Finds

func Finds(t *testing.T, needles []string, sources []string)

func Format

func Format(names ...string) (s string)

func GetEnvVariable

func GetEnvVariable(key string) string

GetEnvVariable use godot package to load/read the .env file and return the value of the key

func Preppends

func Preppends(names []string, post string) []string

func Ptr

func Ptr[K any](m K) *K

func RandomID

func RandomID(n int) string

func Reduce

func Reduce[T, R any](ss []T, test func(T) R) (ret []R)

Types

This section is empty.

Jump to

Keyboard shortcuts

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