Documentation
¶
Index ¶
- func ApplyHideWindow(cmd *exec.Cmd)
- func CalcColIndex(colNumber int) (colIndex string, ok bool)
- func ConvertDateFormat(pattern string) string
- func ConvertToDateString(value any, goDateFormat string) string
- func FormatValue(value any) string
- func GetTerminalWidth() int
- func IsColorSupported() bool
- func ParseColIndex(colIndex string) (colNumber int, ok bool)
- func ToFloat64(v any) float64
- func ToFloat64Safe(v any) (float64, bool)
- func TruncateString(s string, maxLength int) string
- func TryParseTime(str string) (time.Time, bool)
- type F64orRat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyHideWindow ¶ added in v0.2.13
ApplyHideWindow is a no-op on non-Windows platforms.
The function exists so callers can unconditionally call it regardless of platform; on Unix-like systems there is no console window to hide, so this simply accepts the *exec.Cmd and does nothing.
func CalcColIndex ¶ added in v0.2.13
func ConvertDateFormat ¶ added in v0.2.4
ConvertDateFormat 將常見的日期格式模式轉換為 Go 語言的時間格式
func ConvertToDateString ¶ added in v0.2.6
convertToDateString 將日期值或時間戳轉換為指定格式的字串(使用Go時間格式)
func FormatValue ¶ added in v0.2.5
FormatValue 根據值的類型格式化輸出,改善顯示效果
func IsColorSupported ¶ added in v0.2.9
func IsColorSupported() bool
IsColorSupported 檢測當前終端是否支持 ANSI 顏色代碼
func ParseColIndex ¶
func ToFloat64Safe ¶ added in v0.2.5
ToFloat64Safe tries to convert any numeric value to float64 and returns a boolean indicating success.
func TruncateString ¶ added in v0.2.5
TruncateString 截斷字符串到指定寬度,太長的字符串末尾加上省略號,使用 runewidth 計算字元寬度
Types ¶
Click to show internal directories.
Click to hide internal directories.