MCPcopy Create free account
hub / github.com/go-dev-frame/sponge / customEndOfLetterToLower

Function customEndOfLetterToLower

pkg/sql2code/parser/commonParser.go:387–400  ·  view source on GitHub ↗
(srcStr string, str string)

Source from the content-addressed store, hash-verified

385}
386
387func customEndOfLetterToLower(srcStr string, str string) string {
388 l := len(str) - len(srcStr)
389 if l == 1 {
390 if str[len(str)-1] == 'S' {
391 return str[:len(str)-1] + "s"
392 }
393 } else if l == 2 {
394 if str[len(str)-2:] == "ES" {
395 return str[:len(str)-2] + "es"
396 }
397 }
398
399 return str
400}
401
402func getHandlerGoType(field *tmplField) string {
403 var goType = field.GoType

Callers 4

newTableInfoFunction · 0.70
setCrudInfoFunction · 0.70
newCrudInfoFunction · 0.70

Calls

no outgoing calls

Tested by 1