feat(goctl): Add api parser (#2585)

This commit is contained in:
anqiansong
2023-03-28 23:45:26 +08:00
committed by GitHub
parent 455a6c8f97
commit 50bc361430
59 changed files with 11633 additions and 6 deletions

View File

@@ -111,3 +111,13 @@ func isGolangKeyword(s string) bool {
_, ok := goKeyword[s]
return ok
}
func TrimWhiteSpace(s string) string {
r := strings.NewReplacer(" ", "", "\t", "", "\n", "", "\f", "", "\r", "")
return r.Replace(s)
}
func IsEmptyStringOrWhiteSpace(s string) bool {
v := TrimWhiteSpace(s)
return len(v) == 0
}