Documentation
¶
Index ¶
- type Name
- func (n Name) AllUpperKebab() string
- func (n Name) AllUpperSnake() string
- func (n Name) Append(s string) Name
- func (n Name) Equal(other Name) bool
- func (n Name) FirstUpperKebab() string
- func (n Name) FirstUpperSnake() string
- func (n Name) Get(i int) Name
- func (n Name) Join(sep, prefix, suffix string) string
- func (n Name) Len() int
- func (n Name) LowerCamel() string
- func (n Name) LowerKebab() string
- func (n Name) LowerSnake() string
- func (n Name) Map(f func(w string) string) Name
- func (n Name) Prepend(s string) Name
- func (n Name) RemoveIf(f func(w string) bool) Name
- func (n Name) Slice(begin, end int) Name
- func (n Name) String() string
- func (n Name) UpperCamel() string
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Name ¶
type Name struct {
// contains filtered or unexported fields
}
func (Name) AllUpperKebab ¶
func (Name) AllUpperSnake ¶
func (Name) FirstUpperKebab ¶
func (Name) FirstUpperSnake ¶
func (Name) LowerCamel ¶
func (Name) LowerKebab ¶
func (Name) LowerSnake ¶
func (Name) UpperCamel ¶
type Registry ¶
Registry provides safe names which are not included in the reserved keywords.
func NewRegistry ¶
NewRegistry creates a new name registry. The parameter reserved is a list of reserved keywords. The parameter modify is a function to modify the name when the name is already used, which takes the specified name and the number of the modifications and returns the modified name.
Click to show internal directories.
Click to hide internal directories.