Documentation
¶
Index ¶
- Variables
- func BytesToYamlObject(yamlBytes []byte) (yamlObject interface{}, err error)
- func ConvertDateFormat(dateString, srcFormat, dstFormat string) (string, error)
- func DateStringToEpocInt64(dateString, dateFormat string) (int64, error)
- func Die(format string, args ...interface{})
- func EpocInt64ToTime(epocInt int64) time.Time
- func EpocStringToTime(epocString string) (time.Time, error)
- func FileExist(filePath string) (e bool)
- func FileModTime(filePath string) int
- func FileNotExist(filePath string) (e bool)
- func FileSize(filePath string) int64
- func FileUsable(filePath string) (e bool)
- func FirstN(s string, n int) string
- func GetDateInDays(days string) time.Time
- func GetDaysBetween(date1, date2 string) int64
- func GetDaysSinceOrTo(date1 string) int64
- func GetType(v interface{}) string
- func Int64Abs(x int64) int64
- func Int64ToString(i int64) string
- func IntAbs(x int) int
- func IsHexDigit(c rune) bool
- func IsLeapYear(year int64) bool
- func ItemInList(arg string, argList []string) bool
- func JsonBytesReindent(jsonBytes []byte, indent int) (jsonBytes2 []byte, err error)
- func JsonToBytes(jsonObject interface{}) (jsonBytes []byte, err error)
- func JsonToBytesIndent(jsonObject interface{}, indent int) (jsonBytes []byte, err error)
- func LastElem(s, splitter string) string
- func LoadFileJson(filePath string) (jsonObject interface{}, err error)
- func LoadFileYaml(filePath string) (yamlObject interface{}, err error)
- func LoadFileYamlBytes(filePath string) (yamlBytes []byte, err error)
- func MergeMaps(m1, m2 map[string]string) (result map[string]string)
- func MergeObjects(x, y map[string]interface{}) (obj map[string]interface{})
- func PadSpaces(targetWidth, stringWidth int) string
- func PostSpc(value interface{}, width int) string
- func PreSpc(value interface{}, width int) string
- func Prettify(jsonObject interface{}) (pretty string, err error)
- func PrintColorSamples()
- func PrintDays(days int64)
- func PrintJson(jsonObject interface{})
- func PrintJsonBytesColor(jsonBytes []byte)
- func PrintJsonColor(jsonObject interface{})
- func PrintYaml(yamlObject interface{})
- func PrintYamlBytesColor(yamlBytes []byte)
- func PrintYamlColor(yamlObject interface{})
- func PromptMsg(msg string) rune
- func RemoveFile(filePath string)
- func SameType(a, b interface{}) bool
- func SaveFileJson(jsonObject interface{}, filePath string)
- func SaveFileYaml(yamlObject interface{}, filePath string)
- func SortMapStringKeys(obj map[string]string) (sortedKeys []string)
- func SortObjStringKeys(obj map[string]interface{}) (sortedKeys []string)
- func Str(x interface{}) string
- func StringToInt64(s string) (int64, error)
- func SubString(large, small string) bool
- func ToStr(value interface{}) string
- func Trace() string
- func ValidDate(dateString, expectedFormat string) bool
- func ValidUuid(s string) bool
- func YamlToBytes(yamlObject interface{}) (yamlBytes []byte, err error)
- func YamlToBytesIndent(yamlObject interface{}, indent int) (yamlBytes []byte, err error)
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 BytesToYamlObject ¶ added in v1.1.9
func ConvertDateFormat ¶ added in v1.1.2
func DateStringToEpocInt64 ¶ added in v1.1.2
func EpocInt64ToTime ¶ added in v1.1.8
func FileModTime ¶
func FileNotExist ¶
func FileUsable ¶
func GetDateInDays ¶ added in v1.1.8
func GetDaysBetween ¶ added in v1.1.8
func GetDaysSinceOrTo ¶ added in v1.1.8
func Int64ToString ¶ added in v1.1.8
func IsHexDigit ¶ added in v1.0.6
func IsLeapYear ¶ added in v1.1.8
func ItemInList ¶
func JsonBytesReindent ¶ added in v1.1.9
func JsonToBytes ¶ added in v1.1.9
func JsonToBytesIndent ¶ added in v1.1.9
func LoadFileJson ¶
func LoadFileYaml ¶
func LoadFileYamlBytes ¶ added in v1.1.8
func MergeObjects ¶
func PrintColorSamples ¶ added in v1.0.14
func PrintColorSamples()
func PrintJsonBytesColor ¶ added in v1.1.9
func PrintJsonBytesColor(jsonBytes []byte)
func PrintJsonColor ¶ added in v1.1.9
func PrintJsonColor(jsonObject interface{})
func PrintYamlBytesColor ¶ added in v1.1.8
func PrintYamlBytesColor(yamlBytes []byte)
func PrintYamlColor ¶ added in v1.1.8
func PrintYamlColor(yamlObject interface{})
func RemoveFile ¶
func RemoveFile(filePath string)
func SaveFileJson ¶
func SaveFileJson(jsonObject interface{}, filePath string)
func SaveFileYaml ¶
func SaveFileYaml(yamlObject interface{}, filePath string)
func SortMapStringKeys ¶ added in v1.1.1
TODO: Combine below two func with interfaces
func SortObjStringKeys ¶ added in v1.1.1
func StringToInt64 ¶ added in v1.1.2
func YamlToBytes ¶ added in v1.1.9
func YamlToBytesIndent ¶ added in v1.1.9
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.