utl

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: MIT Imports: 9 Imported by: 1

README

utl

Common utilities housekeeping functions

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Die

func Die(format string, args ...interface{})

func FileExist

func FileExist(filePath string) (e bool)

func FileModTime

func FileModTime(filePath string) int

func FileNotExist

func FileNotExist(filePath string) (e bool)

func FileSize

func FileSize(filePath string) int64

func FileUsable

func FileUsable(filePath string) (e bool)

func GetType added in v1.0.0

func GetType(v interface{}) string

func ItemInList

func ItemInList(arg string, argList []string) bool

func LastElem

func LastElem(s, splitter string) string

func LoadFileJson

func LoadFileJson(filePath string) (jsonObject interface{}, err error)

func LoadFileYaml

func LoadFileYaml(filePath string) (yamlObject interface{}, err error)

func MergeMaps

func MergeMaps(m1, m2 map[string]string) (result map[string]string)

func MergeObjects

func MergeObjects(x, y map[string]interface{}) (obj map[string]interface{})

func PadSpaces

func PadSpaces(n int)

func Prettify

func Prettify(jsonObject interface{}) (pretty string, err error)

func PrintJson

func PrintJson(jsonObject interface{})

func PrintYaml

func PrintYaml(yamlObject interface{})

func RemoveFile

func RemoveFile(filePath string)

func SameType

func SameType(a, b interface{}) bool

func SaveFileJson

func SaveFileJson(jsonObject interface{}, filePath string)

func SaveFileYaml

func SaveFileYaml(yamlObject interface{}, filePath string)

func Str added in v1.0.2

func Str(x interface{}) string

func SubString

func SubString(large, small string) bool

func Trace

func Trace() string

func ValidUuid

func ValidUuid(s string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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