Documentation ¶
Index ¶
- func ConvertModel(srcModel any, dstModelPointer any) error
- func Float2String(f float64, suffix string) string
- func InitTimezone()
- func Int2String(i int, suffix string) string
- func LoopExecute(ctx context.Context, job func() error, interval time.Duration) error
- func StrTerminalLen(str string) int
- func TableStr(lines [][]string, colMaxWidth []int) string
- func TextBlue(src string) string
- func TextGreen(src string) string
- func TextPurple(src string) string
- func TextRed(src string) string
- func TextYellow(src string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertModel ¶
ConvertModel 源模型的字段会覆盖目标模型的字段。注意转换多个源到目的模型时多个源的字段相同问题。
func Float2String ¶
func InitTimezone ¶
func InitTimezone()
func Int2String ¶
func LoopExecute ¶
LoopExecute 2次逻辑执行相隔的时间为:逻辑的执行时间 + 间隔时间
func StrTerminalLen ¶
StrTerminalLen 获取字符串在终端中输出的长度 例子: 中文 => 4 en => 2
func TextPurple ¶
func TextYellow ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.