Documentation
¶
Index ¶
- func ConvNumToBase62(num uint) string
- func CurrentTimestampStr() string
- func Empty(val interface{}) bool
- func FillHttpScheme(url string) string
- func FirstElement(args []string) string
- func GenerateTraceID() string
- func MicrosecondsStr(elapsed time.Duration) string
- func RandomNumber(length int) string
- func RandomString(length int) string
- func ToJson(a any, indent bool) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentTimestampStr ¶
func CurrentTimestampStr() string
func FillHttpScheme ¶
func FirstElement ¶
FirstElement 安全地获取 args[0],避免 panic: runtime error: index out of range
func GenerateTraceID ¶
func GenerateTraceID() string
func MicrosecondsStr ¶
MicrosecondsStr 将 time.Duration 类型(nano seconds 为单位) 输出为小数点后 3 位的 ms (microsecond 毫秒,千分之一秒)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.