Documentation
¶
Index ¶
- Variables
- func ConvertToPinyin(content string) string
- func FileExist(path string) bool
- func FileExt(fileName string) string
- func FileType(fileName string) string
- func GetCurrentTime() string
- func GetDateStr() string
- func GetIPInfo(clientIP string) string
- func GetTimeDay(day int) string
- func GetTimeFromTimestamp(stamp int64) string
- func GetTimeHour(hour int) string
- func GetTimeMinute(minute int) string
- func GetTimeMonth(month int) string
- func GetTimeYear(year int) string
- func InitSegmenter()
- func IntToString(i int) string
- func JsonToStruct(data string, v interface{}) error
- func ListFiles(path string) []string
- func LogInfo(ctx *context.Context, f string, v ...interface{})
- func LogWarning(ctx *context.Context, f string, v ...interface{})
- func ParseInt(s string) int
- func ReadLog() []string
- func ReadStringFromPath(path string) string
- func SplitWords(str string) []string
- func StructToJson(v interface{}) string
- func StructToJsonFormatted(v interface{}) string
- func Time2String(t time.Time) string
- func WriteStringToPath(s string, path string)
Constants ¶
This section is empty.
Variables ¶
View Source
var Segmenter sego.Segmenter
Functions ¶
func ConvertToPinyin ¶
func GetDateStr ¶
func GetDateStr() string
GetDateStr returns formatted current time with the year, month and day.
func GetTimeDay ¶
GetTimeDay returns the time after the specified duration(day).
func GetTimeFromTimestamp ¶
func GetTimeHour ¶
GetTimeHour returns the time after the specified duration(hour).
func GetTimeMinute ¶
GetTimeMinute returns the time after the specified duration(minute).
func GetTimeMonth ¶
GetTimeMonth returns the time after the specified duration(month).
func GetTimeYear ¶
GetTimeYear returns the time after the specified duration(year).
func InitSegmenter ¶
func InitSegmenter()
func IntToString ¶
func JsonToStruct ¶
func LogWarning ¶
func ReadStringFromPath ¶
func StructToJson ¶
func StructToJson(v interface{}) string
func StructToJsonFormatted ¶
func StructToJsonFormatted(v interface{}) string
func Time2String ¶ added in v1.4.0
func WriteStringToPath ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.