utils

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultStringEmpty

func DefaultStringEmpty(value string, defaultVal string) string

DefaultStringEmpty : get default string if value is empty

func GetEnv

func GetEnv(key, defaultVal string) string

GetEnv : get environment variables with default value

func Hex

func Hex(numBytes int) string

Hex : Random hexacode with length = numBytes * 2

func RequireGetEnv

func RequireGetEnv(key string) (val string, exist bool)

RequireGetEnv : get environment variable with requirement

func SetIfNotEmpty

func SetIfNotEmpty(target *string, value string)

SetIfNotEmpty : set target = value if value is not empty

Types

This section is empty.

Jump to

Keyboard shortcuts

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