util

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(err error)

Check will log an error using log.Fatal() if err is not nil, otherwise nothing happens.

func Contains added in v0.0.10

func Contains[T comparable](elems []T, v T) bool

Contains looks inside a slice to see if a specific element exists. This is not fast, and intended only when the length of the slice is small as a linear search is used.

func GetEnvar

func GetEnvar(name string, defaultValue string) string

GetEnvar will return the envar if set, otherwise the default string provided.

Types

This section is empty.

Jump to

Keyboard shortcuts

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