解析device和task的配置全部用内置方法处理

This commit is contained in:
2025-09-27 00:58:22 +08:00
parent 29fa23ba36
commit aed665b6b0
8 changed files with 46 additions and 15 deletions

View File

@@ -0,0 +1,13 @@
package utils
import (
"fmt"
"strconv"
)
// IsPureNumeric 检查值是否纯数字(整数或可转换为整数的字符串)。
func IsPureNumeric(val interface{}) bool {
v := fmt.Sprintf("%v", val)
_, err := strconv.Atoi(v)
return err == nil
}