Documentation ¶
Index ¶
- Constants
- func Bytes2String(b []byte) string
- func GetDeployRootPath(evalSymlinks bool) string
- func GetGmtDate() string
- func GetServerIp() string
- func Stack(skip int) []byte
- func StackNoNewLine(skip int) string
- func StrToTimestamp(str string, layout string) (int64, error)
- func String2Bytes(s string) []byte
- func TimestampToStr(timestamp int64, layout string) string
Constants ¶
View Source
const ( TIME_SECNDS_OF_ONE_DAY = 86400 TIME_FORMAT_YMDHIS_LAYOUT = "2006-01-02 15:04:05" TIME_FORMAT_YMD_LAYOUT = "2006-01-02" TIME_FORMAT_GMT_LAYOUT = "Mon, 02 Jan 2006 15:04:05 GMT" )
Variables ¶
This section is empty.
Functions ¶
func Bytes2String ¶
func GetDeployRootPath ¶
GetDeployRootPath得到部署的根目录 evalSymlinks参数是是否需要软链,一般情况传入true
func GetGmtDate ¶ added in v1.1.0
func GetGmtDate() string
func GetServerIp ¶
func GetServerIp() string
只获取ip的简版 https://blog.csdn.net/sinat_26682309/article/details/93781113
func StackNoNewLine ¶
StackNoNewLine返回当前调用栈的信息,不含有换行符。 日志中输出调用栈信息可以用此方法,用于某些日志采集程序不支持多行的情况
func StrToTimestamp ¶ added in v1.1.0
年月日时分秒转时间戳
func String2Bytes ¶
func TimestampToStr ¶ added in v1.1.0
时间戳转年月日时分秒
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.