bingo_utils

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

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

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 4 Imported by: 8

Documentation

Index

Constants

View Source
const (
	FORMAT_DATE         = "2006-01-02"
	FORMAT_DATETIME     = "2006-01-02 15:04:05"
	FORMAT_DATETIME_LOG = "2006-01-02 15:04:05.000"
)

Variables

This section is empty.

Functions

func Debug

func Debug(msg ...interface{})

func Debugf

func Debugf(format string, msg ...interface{})

func Err

func Err(msg ...interface{})

func GetCurrentTimestamp

func GetCurrentTimestamp() int64

func GetCurrentTimestampStr

func GetCurrentTimestampStr() string

func Info

func Info(msg ...interface{})

func Now

func Now() string

func SetLogDebugFunc

func SetLogDebugFunc(f LogFunc)

func SetLogErrFunc

func SetLogErrFunc(f LogFunc)

func SetLogInfoFunc

func SetLogInfoFunc(f LogFunc)

func SinceMinutes

func SinceMinutes(fromtime string) int

func Today

func Today() string

Types

type DateTime

type DateTime struct {
	// contains filtered or unexported fields
}

日期,兼容java习惯

func (DateTime) CurrentTimeMillis

func (this DateTime) CurrentTimeMillis() string

func (*DateTime) FromDateTime

func (this *DateTime) FromDateTime(dt string)

func (*DateTime) FromTimeMillis

func (this *DateTime) FromTimeMillis(long int64)

func (*DateTime) GetDate

func (this *DateTime) GetDate() string

func (*DateTime) GetTimeMillis

func (this *DateTime) GetTimeMillis() string

type LogFunc

type LogFunc func(msg ...interface{})

日志输出函数

type MethodError

type MethodError struct {
	// contains filtered or unexported fields
}

func CreateError

func CreateError(c int, text string) MethodError

func (MethodError) Code

func (this MethodError) Code() int

func (MethodError) Error

func (this MethodError) Error() string

type Object

type Object interface{}

type TagOptions

type TagOptions []string

选项,格式 name,opt,opt1,opt2

func (TagOptions) Has

func (t TagOptions) Has(opt string) bool

Has returns true if the given optiton is available in TagOptions

func (TagOptions) ParseTag

func (t TagOptions) ParseTag(tag string) TagOptions

parseTag splits a struct field's tag into its name and a list of options which comes after a name. A tag is in the form of: "name,option1,option2". The name can be neglectected.

func (*TagOptions) ToString

func (t *TagOptions) ToString() string

将选项转换成name,opt,opt1,opt2格式

Directories

Path Synopsis
mq

Jump to

Keyboard shortcuts

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