utils

package module
v0.0.0-...-eff5b49 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: MIT Imports: 16 Imported by: 1

README

goutils

Common utilities for golang.

Documentation

Index

Constants

View Source
const (
	LogLevelError = iota
	LogLevelWarn
	LogLevelInfo
	LogLevelDebug
)

Variables

This section is empty.

Functions

func Average

func Average(args ...float64) float64

func Check

func Check(err error) bool

func CheckNil

func CheckNil(ptr interface{}) bool

func Debug

func Debug(msg string)

func Error

func Error(msg string)

func Exec

func Exec(name string, arg ...string) (string, string, error)

func GbkToUtf8

func GbkToUtf8(str string) (string, error)

func Gopath

func Gopath() string

func HttpDownload

func HttpDownload(url string, out string)

func HttpPostJson

func HttpPostJson(postBody []byte, url string) ([]byte, error)

func Info

func Info(msg string)

func Max

func Max(args ...float64) float64

func Min

func Min(args ...float64) float64

func Pwd

func Pwd() string

func SetLogLevel

func SetLogLevel(level int)

func Slash

func Slash() string

func StringCount

func StringCount(str string) int

func TimeString

func TimeString() string

func TmpFile

func TmpFile() string

func TmpPath

func TmpPath() string

func UtcStringToYear

func UtcStringToYear(str string) int

func Utf8ToGbk

func Utf8ToGbk(str string) (string, error)

func Warn

func Warn(msg string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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