This repository has been archived on 2025-03-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
crudgen/internal/utils.go

20 lines
293 B
Go

package internal
import (
"strings"
"unicode"
)
func CapitalizeFirst(s string) string {
if len(s) == 0 {
return s
}
runes := []rune(s)
runes[0] = unicode.ToUpper(runes[0])
return string(runes)
}
func ToPlural(entityName string) string {
return strings.ToLower(entityName) + "s"
}