Documentation
¶
Index ¶
- Constants
- func DGetCurrentTime(layout string) string
- func Dump(name string) (*os.File, error)
- func Duration(d int64) time.Duration
- func Exists(p string) bool
- func FormatMemStats(m1, m2 *runtime.MemStats) string
- func FromLocalDateToSecond(v string) int64
- func FromSecondToLocalDate(v int64) string
- func FromTime2TimeInt(t time.Time) int
- func FuncName(skip int) string
- func GetCurrentMicrosecond() int64
- func GetCurrentMillisecond() int64
- func GetCurrentNanosecond() int64
- func GetCurrentSecond() int64
- func GetCurrentTime() string
- func GetLocalIP() string
- func GetRealIP(request *http.Request) (string, error)
- func HumanSize(s uint64) string
- func IsEmpty(dir string) (bool, error)
- func IsLink(p string) (bool, error)
- func IsLocalIP(request *http.Request) (bool, error)
- func IsSameDay(t1, t2 time.Time) bool
- func IsSameDayWithTimestamp(d1, d2 int64) bool
- func ListDir(dir string) ([]string, error)
- func LoadJsonToObject(filename string, t interface{}) error
- func Marshal(v interface{}) ([]byte, error)
- func ParseJSON(path string, v interface{}) error
- func ReviewDumpPanic(file *os.File) error
- func RuntimeStats(d time.Duration, f func(string))
- func Sleep(millisecond int64)
- func SplitTimeInt(t int) (year, month, day int)
Constants ¶
View Source
const ( Nanosecond = int64(time.Nanosecond) // Nanosecond Microsecond = 1000 * Nanosecond // Nanosecond Millisecond = 1000 * Microsecond // Nanosecond Second = 1000 * Millisecond // Nanosecond Minute = 60 * Second // Nanosecond Hour = 60 * Minute // Nanosecond Day = 24 * Hour // Nanosecond Year = 365 * Day // Nanosecond SecondsPerYear = Year / Second // Second SecondsPerDay = Day / Second // Second SecondsPerHour = Hour / Second // Second SecondsPerMinute = Minute / Second // Second MillisecondsPerYear = Year / Millisecond // Millisecond MillisecondsPerDay = Day / Millisecond // Millisecond MillisecondsPerHour = Hour / Millisecond // Millisecond MillisecondsPerMinute = Minute / Millisecond // Millisecond MillisecondsPerSecond = Second / Millisecond // Millisecond MicrosecondsPerYear = Year / Microsecond // Microsecond MicrosecondsPerDay = Day / Microsecond // Microsecond MicrosecondsPerHour = Hour / Microsecond // Microsecond MicrosecondsPerMinute = Minute / Microsecond // Microsecond MicrosecondsPerSecond = Second / Microsecond // Microsecond MicrosecondsPerMillisecond = Millisecond / Microsecond // Microsecond )
Variables ¶
This section is empty.
Functions ¶
func DGetCurrentTime ¶
func FormatMemStats ¶
func FromLocalDateToSecond ¶
func FromSecondToLocalDate ¶
func FromTime2TimeInt ¶
func GetCurrentMicrosecond ¶
func GetCurrentMicrosecond() int64
func GetCurrentMillisecond ¶
func GetCurrentMillisecond() int64
func GetCurrentNanosecond ¶
func GetCurrentNanosecond() int64
func GetCurrentSecond ¶
func GetCurrentSecond() int64
func GetCurrentTime ¶
func GetCurrentTime() string
func GetLocalIP ¶
func GetLocalIP() string
func IsSameDayWithTimestamp ¶
func LoadJsonToObject ¶
func ReviewDumpPanic ¶
func RuntimeStats ¶
get runtime stats,contained goroutine numbers,gc pause,heap objects,heap alloc and malloc
func SplitTimeInt ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.