utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLogTimeFormat = "2006-01-02 15:04:05"

DefaultLogTimeFormat TODO

Variables

View Source
var DefaultSchemePort = map[string]string{
	"http":  "80",
	"https": "443",
	"ftp":   "21",
	"ssh":   "22",
}

DefaultSchemePort TODO

View Source
var Logger *logging.Logger = logging.MustGetLogger(appLoggerName)

Logger global logger

Functions

func AbsInt64

func AbsInt64(n int64) int64

AbsInt64 TODO

func ConfigureLogger

func ConfigureLogger(conf *viper.Viper) error

ConfigureLogger init logging with conf

func NewProcess

func NewProcess() (*process.Process, error)

NewProcess TODO

func NewRedisClient

func NewRedisClient(conf *viper.Viper) (*redis.Client, error)

NewRedisClient create redis client and connect

func ParseRedisInfo

func ParseRedisInfo(info string, key string) (string, string)

ParseRedisInfo TODO

Types

type ParsedURL

type ParsedURL struct {
	Parsed *url.URL
	Host   string
	Port   string
}

ParsedURL TODO

func NewParsedURL

func NewParsedURL(rawURL string) (parsedURL *ParsedURL, err error)

NewParsedURL TODO

Jump to

Keyboard shortcuts

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