Documentation
¶
Index ¶
- Variables
- func BuildDir(absDir string) error
- func BuildRelativePath(prepath, routerPath string) string
- func ByteCountSI(b int64) string
- func FileIsExist(filename string) bool
- func FindTag(obj interface{}, field, tag string) string
- func FormatTime(tm time.Time, forStr string) string
- func GetCommentAfterPrefixRegex(fullComment string, name string) (prefix string, comment string, b bool)
- func GetCurrentDirectory() string
- func GetDay0(timestamp int64) time.Time
- func GetDayStr(tm time.Time) string
- func GetHour(timestamp int64) int
- func GetHour0(timestamp int64) time.Time
- func GetIntranetIp() string
- func GetKvType(k string, isArray, isType bool) string
- func GetLastDayCurrentTime(timestamp int64, offset int) time.Time
- func GetLocalTime(tm time.Time) time.Time
- func GetMod(fileName string) string
- func GetMonth0(timestamp int64) time.Time
- func GetPathDirs(absDir string) (re []string)
- func GetSysTimeLayout() string
- func GetTimeStr(tm time.Time) string
- func GetTimeWeek(timestamp int64) int
- func GetUtcDay0(tm time.Time) int64
- func GetUtcHour0(tm time.Time) int64
- func GetUtcTime(tm time.Time) int64
- func GetUtcWeek0(timestamp int64) int64
- func GetWeek0(timestamp int64) time.Time
- func IsEnum(t string) bool
- func IsInternalType(t string) bool
- func MarshalToJson(obj interface{}, isFormat bool) string
- func OpenBrowser(uri string) error
- func ReadFile(fname string) []byte
- func StrToTime(tStr, format string, timeZone *time.Location) time.Time
- func StringTimeToUnix(timestr string) int64
- func TimerByHour(f func())
- func UnixToTime(timestamp int64) time.Time
- func WriteFile(fname string, src []byte, isClear bool) bool
- type Time
Constants ¶
This section is empty.
Variables ¶
View Source
var Log logs.FieldLogger = &logs.Logger{ Out: os.Stderr, Hooks: make(logs.LevelHooks), Formatter: &logs.TextFormatter{ ForceColors: true, FullTimestamp: true, TimestampFormat: "01-02 15:04:05", QuoteEmptyFields: false, CallerPrettifier: nil, HideLevelText: true, }, ReportCaller: false, Level: logs.DebugLevel, }
Functions ¶
func BuildRelativePath ¶ added in v0.4.0
func FormatTime ¶ added in v0.3.0
FormatTime 格式化时间
func GetCommentAfterPrefixRegex ¶
func GetCommentAfterPrefixRegex(fullComment string, name string) (prefix string, comment string, b bool)
GetCommentAfterPrefixRegex 解析注释 分离前缀和注释内容
func GetCurrentDirectory ¶ added in v0.3.0
func GetCurrentDirectory() string
GetCurrentDirectory 获取exe所在目录
func GetIntranetIp ¶ added in v0.3.0
func GetIntranetIp() string
func GetLastDayCurrentTime ¶ added in v0.3.0
GetLastDayCurrentTime 获取offset天的现在时间:注意时区
func GetUtcWeek0 ¶ added in v0.3.0
GetUtcWeek0 获取最近上个星期天的零点日期
func MarshalToJson ¶ added in v0.3.0
MarshalToJson obj to json string
func OpenBrowser ¶
OpenBrowser Open calls the OS default program for uri
func StringTimeToUnix ¶ added in v0.5.4
StringTimeToUnix 给定字符串时间转换成本地时间戳
Types ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.