Documentation ¶
Index ¶
- func Contains[T comparable](list []T, val T) bool
- func ContainsSome[v comparable](list []v, vals []v) bool
- func DirMustExist(dirPath string) error
- func FindIndex[T any](list []T, test func(T) bool) (int, bool)
- func GetBinDirPath() string
- func GetEnvDur(key string, def time.Duration) (time.Duration, error)
- func GetEnvInt(key string, def int) (int, error)
- func GetEnvString(key, def string) string
- func HashSHA256(s string) (string, error)
- func Logger(process string, tags map[string]interface{}) zerolog.Logger
- func LoggerToFile(filename string) (*os.File, error)
- func MergeChanners[T any](list ...<-chan T) <-chan T
- func RandInt(min, max int32) (int32, error)
- func Random[T any](list []T) T
- func SetupLogger(level, format string, tags map[string]interface{})
- func Shuffle[T any](list []T) []T
- func ToLower(list []string) []string
- func WithKillSignal(ctx context.Context) (context.Context, context.CancelFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](list []T, val T) bool
func ContainsSome ¶
func ContainsSome[v comparable](list []v, vals []v) bool
func DirMustExist ¶
func GetBinDirPath ¶
func GetBinDirPath() string
func HashSHA256 ¶
func MergeChanners ¶
func MergeChanners[T any](list ...<-chan T) <-chan T
func SetupLogger ¶
func WithKillSignal ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.