Documentation
¶
Index ¶
- func AllOrSomeFilter(list, filterList []string) []string
- func FormatUsername(s string) string
- func List(n int, do func(i int) string) []string
- func NoDash(s string) string
- func NoNumberPrefix(s string) string
- func SliceContains(ss []string, s string) bool
- func Title(s string) string
- func ToUpperFirst(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllOrSomeFilter ¶
AllOrSomeFilter filters elems out from the list as they present in filterList and returns the remaining ones. if filterList is empty, all elems from list returned.
func FormatUsername ¶
FormatUsername formats a username to make it usable as a variable.
func List ¶
List returns a slice of strings captured after the value returned by do which is called n times.
func NoNumberPrefix ¶
NoNumberPrefix adds an underscore at the beginning of the string if it stars with a number this is used for package of proto files template because the package name can't start with a number.
func SliceContains ¶
SliceContains returns with true if s is a member of ss.
func Title ¶
Title returns a copy of the string s with all Unicode letters that begin words mapped to their Unicode title case.
func ToUpperFirst ¶ added in v0.26.0
ToUpperFirst returns a copy of the string with the first unicode letter in upper case.
Types ¶
This section is empty.