feat(goctl): Support gateway sample generation (#3049)

This commit is contained in:
anqiansong
2023-03-29 17:06:23 +08:00
committed by GitHub
parent 95b85336d6
commit 1904af2323
32 changed files with 1399 additions and 513 deletions

View File

@@ -140,3 +140,15 @@ func ContainsAny(s string, runes ...rune) bool {
func ContainsWhiteSpace(s string) bool {
return ContainsAny(s, WhiteSpace...)
}
func IsWhiteSpace(text string) bool {
if len(text) == 0 {
return true
}
for _, r := range text {
if !unicode.IsSpace(r) {
return false
}
}
return true
}