Fix HTTP Addr & macOS v3 m_nsUsrName is NULL (#4)

This commit is contained in:
Sarv
2025-03-25 18:11:25 +08:00
committed by GitHub
parent 3f673cbd7e
commit 98f41454fb
4 changed files with 36 additions and 11 deletions

View File

@@ -32,3 +32,12 @@ func MustAnyToInt(v interface{}) int {
}
return 0
}
func IsNumeric(s string) bool {
for _, r := range s {
if !unicode.IsDigit(r) {
return false
}
}
return len(s) > 0
}