Documentation
¶
Index ¶
- Constants
- func Debug(msg ...interface{})
- func Debugf(format string, msg ...interface{})
- func Err(msg ...interface{})
- func GetCurrentTimestamp() int64
- func GetCurrentTimestampStr() string
- func Info(msg ...interface{})
- func Now() string
- func SetLogDebugFunc(f LogFunc)
- func SetLogErrFunc(f LogFunc)
- func SetLogInfoFunc(f LogFunc)
- func SinceMinutes(fromtime string) int
- func Today() string
- type DateTime
- type LogFunc
- type MethodError
- type Object
- type TagOptions
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 GetCurrentTimestamp ¶
func GetCurrentTimestamp() int64
func GetCurrentTimestampStr ¶
func GetCurrentTimestampStr() string
func SetLogDebugFunc ¶
func SetLogDebugFunc(f LogFunc)
func SetLogErrFunc ¶
func SetLogErrFunc(f LogFunc)
func SetLogInfoFunc ¶
func SetLogInfoFunc(f LogFunc)
func SinceMinutes ¶
Types ¶
type DateTime ¶
type DateTime struct {
// contains filtered or unexported fields
}
日期,兼容java习惯
func (DateTime) CurrentTimeMillis ¶
func (*DateTime) FromDateTime ¶
func (*DateTime) FromTimeMillis ¶
func (*DateTime) GetTimeMillis ¶
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 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.
Click to show internal directories.
Click to hide internal directories.