Documentation ¶
Overview ¶
Package snaker provides methods to convert CamelCase to and from snake_case.
snaker takes into takes into consideration common initialisms (ie, ID, HTTP, ACL, etc) when converting to/from CamelCase and snake_case.
Index ¶
- func AddInitialisms(initialisms ...string) error
- func CamelToSnake(s string) string
- func CamelToSnakeIdentifier(s string) string
- func ForceCamelIdentifier(s string) string
- func ForceLowerCamelIdentifier(s string) string
- func IsInitialism(initialism string) bool
- func SnakeToCamel(s string) string
- func SnakeToCamelIdentifier(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddInitialisms ¶
AddInitialisms adds initialisms to the recognized initialisms.
func CamelToSnakeIdentifier ¶
CamelToSnakeIdentifier converts s to its snake_case identifier.
func ForceCamelIdentifier ¶
ForceCamelIdentifier forces CamelCase specific to Go.
func ForceLowerCamelIdentifier ¶
ForceLowerCamelIdentifier forces the first portion of an identifier to be lower case.
func IsInitialism ¶
IsInitialism indicates whether or not an initialism is registered as an identified initialism.
func SnakeToCamelIdentifier ¶
SnakeToCamelIdentifier converts s to its CamelCase identifier (first letter is capitalized).
Types ¶
This section is empty.