utl

package module
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: MIT Imports: 12 Imported by: 1

README

utl

Common utilities housekeeping functions

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Red  = color.FgLightRed.Render
	Blu  = color.FgLightBlue.Render
	Gre  = color.FgGreen.Render
	Yel  = color.FgYellow.Render
	Whi  = color.FgWhite.Render
	Cya  = color.FgCyan.Render
	Mag  = color.FgLightMagenta.Render
	Gra  = color.FgDarkGray.Render
	Red2 = color.FgRed.Render
	Blu2 = color.FgBlue.Render
	Gre2 = color.FgLightGreen.Render
	Yel2 = color.FgLightYellow.Render
	Whi2 = color.FgLightWhite.Render
	Cya2 = color.FgLightCyan.Render
	Mag2 = color.FgMagenta.Render
)

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 IsHexDigit added in v1.0.6

func IsHexDigit(c rune) bool

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 PrintColorSamples added in v1.0.14

func PrintColorSamples()

func PrintJson

func PrintJson(jsonObject interface{})

func PrintYaml

func PrintYaml(yamlObject interface{})

func PromptMsg added in v1.0.13

func PromptMsg(msg string) rune

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 SortStringMapByKeys added in v1.0.9

func SortStringMapByKeys(inMap map[string]string) (sortedMap map[string]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