utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatchOsSignals

func CatchOsSignals(cleanupCallback CallbackFun, reloadCallback CallbackFun)

func ChangeWorkingDir

func ChangeWorkingDir(workingdir string)

func CheckedClose

func CheckedClose(c io.Closer)

func ContainsStr

func ContainsStr(list []string, item string) bool

func FileExists

func FileExists(filename string) bool

func FileNotExists

func FileNotExists(filename string) bool

func HttpLogger

func HttpLogger(next http.Handler) http.Handler

func InitLogger

func InitLogger(logLevel *string, logFileName string, logConsole bool)

func IsBlank

func IsBlank(value string) bool

func IsNotBlank

func IsNotBlank(value string) bool

func Json

func Json(value interface{}) string

func MapContentToStringKey

func MapContentToStringKey(source model.Dictionary) model.Dictionary

func MapToStringKey

func MapToStringKey(source map[interface{}]interface{}) model.Dictionary

func NowTimestamp

func NowTimestamp() int64

func RandomString

func RandomString(length int) string

func Sprintf

func Sprintf(format string, params model.Dictionary) string

Named format

Types

type CallbackFun

type CallbackFun func()

Jump to

Keyboard shortcuts

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