Documentation ¶
Index ¶
- Constants
- func CheckPanic()
- func DeAES(in, key, iv []byte) ([]byte, error)
- func DebugLog(v ...interface{})
- func DropLog(v ...interface{})
- func EnAES(in, key, iv []byte) ([]byte, error)
- func ErrorLog(v ...interface{})
- func FormatNow() string
- func FormatTime(t time.Time) string
- func FormatTime19(t time.Time) string
- func FormatUTC() string
- func Gunzip(in []byte) ([]byte, error)
- func Gzip(in []byte) ([]byte, error)
- func Hash(mem []byte) uint64
- func HupSignal() <-chan os.Signal
- func InfoLog(v ...interface{})
- func Init(writer io.Writer)
- func IsSystemdService() bool
- func ListenRpc(addr string, obj interface{}) error
- func ListenSocket(addr string, keepalive bool, reactiver func(net.Conn)) error
- func ListenUdp(addr string, bufsize int, reactiver func(*net.UDPAddr, []byte) []byte) error
- func NewUUID() string
- func NumberNow() uint64
- func NumberTime(t time.Time) uint64
- func NumberUTC() uint64
- func ParseNumber(t uint64) (time.Time, error)
- func ParseNumberUTC(t uint64) (time.Time, error)
- func ParseTime(s string) (time.Time, error)
- func ParseTimeUTC(s string) (time.Time, error)
- func QuitSignal() <-chan os.Signal
- func RunShell(exeStr string) (string, error)
- func RuntimeInfo(w io.Writer)
- func SetLogDir(dir string)
- func SetLogLevel(level int)
- func SetLogTime(logtime bool)
- func StringMapKeys(m interface{}) (res []string)
- func WarningLog(v ...interface{})
- type EmptyStruct
- type Lock
- type Semaphore
- type StringList
Constants ¶
View Source
const ( LogLevelDrop = iota LogLevelDebug LogLevelInfo LogLevelWarn LogLevelError LogLevelNone )
Variables ¶
This section is empty.
Functions ¶
func FormatTime ¶
format a time.Time to string as 2006-01-02 15:04:05.999
func FormatTime19 ¶
format a time.Time to string as 2006-01-02 15:04:05
func IsSystemdService ¶
func IsSystemdService() bool
func NumberTime ¶
format a time.Time to number as 20060102150405999
func ParseTimeUTC ¶
parse a string as "2006-01-02 15:04:05.999" to time.Time
func RuntimeInfo ¶
func SetLogLevel ¶
func SetLogLevel(level int)
func SetLogTime ¶
func SetLogTime(logtime bool)
func StringMapKeys ¶
func StringMapKeys(m interface{}) (res []string)
func WarningLog ¶
func WarningLog(v ...interface{})
Types ¶
type Semaphore ¶
type Semaphore struct {
// contains filtered or unexported fields
}
func NewSemaphore ¶
type StringList ¶
type StringList []string
func (StringList) Count ¶
func (this StringList) Count() int
func (StringList) Delete ¶
func (this StringList) Delete(token string) int
func (StringList) IsEmpty ¶
func (this StringList) IsEmpty() bool
func (StringList) Len ¶
func (this StringList) Len() int
func (StringList) Less ¶
func (this StringList) Less(i, j int) bool
func (StringList) Swap ¶
func (this StringList) Swap(i, j int)
func (StringList) UniqueAdd ¶
func (this StringList) UniqueAdd(token string) StringList
Click to show internal directories.
Click to hide internal directories.