Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCase ¶
func ApplyCase(name string, convention NamingConvention) string
ApplyCase converts a string to a specific naming convention (in case you need to override the default)
func ToCamelCase ¶
ToCamelCase converts various naming formats to camelCase Examples:
- snake_case -> snakeCase
- PascalCase -> pascalCase
- alreadyCamelCase -> alreadyCamelCase
func ToSnakeCase ¶
ToSnakeCase converts various naming formats to snake_case Examples:
- camelCase -> camel_case
- PascalCase -> pascal_case
- already_snake_case -> already_snake_case
Types ¶
type NamingConvention ¶
type NamingConvention string
NamingConvention represents different naming conventions
const ( SnakeCase NamingConvention = "snake_case" CamelCase NamingConvention = "camelCase" )
func GetCurrentConvention ¶
func GetCurrentConvention() NamingConvention
GetCurrentConvention returns the current naming convention
Click to show internal directories.
Click to hide internal directories.