Documentation
¶
Index ¶
- func ApplySymbolCasing(s string, overrides []string) string
- func CustomCasingOverrides(raw any) []string
- type Casing
- func (c *Casing) ToCamel(s string) string
- func (c *Casing) ToGoCamel(s string) string
- func (c *Casing) ToGoPascal(s string) string
- func (c *Casing) ToGoPascalIgnoreAcronyms(s string) string
- func (c *Casing) ToKEBAB(s string) string
- func (c *Casing) ToKebab(s string) string
- func (c *Casing) ToPascal(s string) string
- func (c *Casing) ToSNAKE(s string) string
- func (c *Casing) ToSnake(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplySymbolCasing ¶
ApplySymbolCasing rewrites PascalCase word segments to the exact casing configured by the caller. It intentionally only replaces complete Pascal segments, so "ApiKey" becomes "APIKey" while "Apiary" is left unchanged.
func CustomCasingOverrides ¶
Types ¶
type Casing ¶
type Casing struct {
// contains filtered or unexported fields
}
Casing provides a set of methods for converting strings to different casing styles. It generally tries to retain the original casing of acronyms in the input string, unless otherwise specified.
func (*Casing) ToGoPascal ¶
ToGoPascal converts a string to PascalCase using Go initialisms
func (*Casing) ToGoPascalIgnoreAcronyms ¶
ToGoPascalIgnoreAcronyms converts a string to PascalCase using Go initialisms but ignoring acronyms in the original string
Click to show internal directories.
Click to hide internal directories.