utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrNotFound

func ErrNotFound(key string) error

ErrNotFound

func ExecutionTime

func ExecutionTime(start time.Time, name string)

ExecutionTime is an utility func that prints a log with the execution time of a piece of code.

func GetEnv

func GetEnv[V Value](key string) (V, error)

GetEnv

func GetEnvOr

func GetEnvOr[V Value](key string, def V) (V, error)

GetEnvOr

func NewBool

func NewBool(val bool) *bool

NewBool

func NewString

func NewString(val string) *string

NewString

Types

type Value

type Value interface {
	string | int | int8 | int16 | int32 | int64
}

Value

Jump to

Keyboard shortcuts

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