utils

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2020 License: Apache-2.0 Imports: 16 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(filepath string, url string) error

func ErrGetBool

func ErrGetBool(key string, err error) error

func ErrMarshal

func ErrMarshal(err error) error

func ErrUnmarshal

func ErrUnmarshal(key string, err error) error

func Filepath

func Filepath() string

func GetBool

func GetBool(key string) (bool, error)

getBool function returns the boolean config data

func GetHome

func GetHome() string

GetHome returns the home path

func Git

func Git() (version, commitHead string)

git method which allows fetch the git HEAD tag version and commit number

func Marshal

func Marshal(obj interface{}) (string, error)

func NewUUID

func NewUUID() (string, error)

func StrConcat

func StrConcat(s ...string) string

func TcpCheck

func TcpCheck(ip string, port int32) bool

func Unmarshal

func Unmarshal(obj string, result interface{}) error

unmarshal returns parses the JSON config data and stores the value in the reference to result

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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