Documentation ¶
Index ¶
- Variables
- func CamelToKebab[V ~string](v V) string
- func CamelToKebabLower[V ~string](v V) string
- func CamelToKebabUpper[V ~string](v V) string
- func CamelToPascal[V ~string](v V) string
- func CamelToPhrase[V ~string](v V) string
- func CamelToSnake[V ~string](v V) string
- func CamelToSnakeLower[V ~string](v V) string
- func CamelToSnakeUppser[V ~string](v V) string
- func Convert[V ~string](v V, from, to CaseType) string
- func ConvertAs[V ~string](v V, convert string) (string, error)
- func Converter[V ~string](convert string) (func(V) string, error)
- func ConverterCombinations() []string
- func KebabToCamel[V ~string](v V) string
- func KebabToPascal[V ~string](v V) string
- func KebabToPhrase[V ~string](v V) string
- func KebabToSnake[V ~string](v V) string
- func KebabToSnakeLower[V ~string](v V) string
- func KebabToSnakeUpper[V ~string](v V) string
- func MustConvertAs[V ~string](v V, convert string) string
- func MustConverter[V ~string](v V, convert string) func(V) string
- func PascalToCamel[V ~string](v V) string
- func PascalToKebab[V ~string](v V) string
- func PascalToKebabLower[V ~string](v V) string
- func PascalToKebabUpper[V ~string](v V) string
- func PascalToPhrase[V ~string](v V) string
- func PascalToSnake[V ~string](v V) string
- func PascalToSnakeLower[V ~string](v V) string
- func PascalToSnakeUpper[V ~string](v V) string
- func PhraseToCamel[V ~string](v V) string
- func PhraseToKebab[V ~string](v V) string
- func PhraseToKebabLower[V ~string](v V) string
- func PhraseToKebabUpper[V ~string](v V) string
- func PhraseToPascal[V ~string](v V) string
- func PhraseToSnake[V ~string](v V) string
- func PhraseToSnakeLower[V ~string](v V) string
- func PhraseToSnakeUpper[V ~string](v V) string
- func SnakeToCamel[V ~string](v V) string
- func SnakeToKebab[V ~string](v V) string
- func SnakeToKebabLower[V ~string](v V) string
- func SnakeToKebabUpper[V ~string](v V) string
- func SnakeToPascal[V ~string](v V) string
- func SnakeToPhrase[V ~string](v V) string
- type CaseType
- func (t CaseType) MarshalJSON() ([]byte, error)
- func (t CaseType) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (t CaseType) MarshalYAML() (interface{}, error)
- func (t *CaseType) Scan(value interface{}) error
- func (t CaseType) String() string
- func (t *CaseType) UnmarshalJSON(data []byte) error
- func (t *CaseType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- func (t *CaseType) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (t CaseType) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var CaseTypes = caseTypes{ Err: fmt.Errorf("invalid CaseType"), Invalid: CaseType("invalid"), Camel: CaseType("camel"), Kebab: CaseType("kebab"), KebabLower: CaseType("kebab-lower"), KebabUpper: CaseType("kebab-upper"), Pascal: CaseType("pascal"), Phrase: CaseType("phrase"), Snake: CaseType("snake"), SnakeLower: CaseType("snake-lower"), SnakeUpper: CaseType("snake-upper"), Unknown: CaseType("unknown"), }
Functions ¶
func CamelToKebab ¶
func CamelToKebabLower ¶ added in v1.0.28
func CamelToKebabUpper ¶
func CamelToPascal ¶
func CamelToPhrase ¶
func CamelToSnake ¶
func CamelToSnakeLower ¶ added in v1.0.28
func CamelToSnakeUppser ¶ added in v1.0.28
func ConverterCombinations ¶ added in v1.0.29
func ConverterCombinations() []string
func KebabToCamel ¶
func KebabToPascal ¶
func KebabToPhrase ¶
func KebabToSnake ¶
func KebabToSnakeLower ¶ added in v1.0.28
func KebabToSnakeUpper ¶
func MustConvertAs ¶ added in v1.0.28
func MustConverter ¶ added in v1.0.28
func PascalToCamel ¶
func PascalToKebab ¶
func PascalToKebabLower ¶ added in v1.0.28
func PascalToKebabUpper ¶
func PascalToPhrase ¶
func PascalToSnake ¶
func PascalToSnakeLower ¶ added in v1.0.28
func PascalToSnakeUpper ¶
func PhraseToCamel ¶
func PhraseToKebab ¶
func PhraseToKebabLower ¶ added in v1.0.28
func PhraseToKebabUpper ¶
func PhraseToPascal ¶
func PhraseToSnake ¶
func PhraseToSnakeLower ¶ added in v1.0.28
func PhraseToSnakeUpper ¶
func SnakeToCamel ¶
func SnakeToKebab ¶
func SnakeToKebabLower ¶ added in v1.0.28
func SnakeToKebabUpper ¶
func SnakeToPascal ¶
func SnakeToPhrase ¶
Types ¶
type CaseType ¶
type CaseType string
func (CaseType) MarshalJSON ¶
func (CaseType) MarshalXML ¶ added in v1.0.31
func (CaseType) MarshalYAML ¶
func (*CaseType) UnmarshalJSON ¶
func (*CaseType) UnmarshalXML ¶ added in v1.0.31
func (*CaseType) UnmarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.