caser

package
v1.0.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CaseTypes = struct {
	caseTypes
	Err    error
	Values []CaseType
}{

	Err: fmt.Errorf("invalid CaseType"),
	// contains filtered or unexported fields
}

Functions

func CamelToKebab

func CamelToKebab[V ~string](v V) string

func CamelToKebabUpper

func CamelToKebabUpper[V ~string](v V) string

func CamelToPascal

func CamelToPascal[V ~string](v V) string

func CamelToPhrase

func CamelToPhrase[V ~string](v V) string

func CamelToSnake

func CamelToSnake[V ~string](v V) string

func Convert

func Convert[V ~string](v V, from, to CaseType) string

func KebabToCamel

func KebabToCamel[V ~string](v V) string

func KebabToPascal

func KebabToPascal[V ~string](v V) string

func KebabToPhrase

func KebabToPhrase[V ~string](v V) string

func KebabToSnake

func KebabToSnake[V ~string](v V) string

func KebabToSnakeUpper

func KebabToSnakeUpper[V ~string](v V) string

func PascalToCamel

func PascalToCamel[V ~string](v V) string

func PascalToKebab

func PascalToKebab[V ~string](v V) string

func PascalToKebabUpper

func PascalToKebabUpper[V ~string](v V) string

func PascalToPhrase

func PascalToPhrase[V ~string](v V) string

func PascalToSnake

func PascalToSnake[V ~string](v V) string

func PascalToSnakeUpper

func PascalToSnakeUpper[V ~string](v V) string

func PhraseToCamel

func PhraseToCamel[V ~string](v V) string

func PhraseToKebab

func PhraseToKebab[V ~string](v V) string

func PhraseToKebabUpper

func PhraseToKebabUpper[V ~string](v V) string

func PhraseToPascal

func PhraseToPascal[V ~string](v V) string

func PhraseToSnake

func PhraseToSnake[V ~string](v V) string

func PhraseToSnakeUpper

func PhraseToSnakeUpper[V ~string](v V) string

func SnakeToCamel

func SnakeToCamel[V ~string](v V) string

func SnakeToKebab

func SnakeToKebab[V ~string](v V) string

func SnakeToKebabUpper

func SnakeToKebabUpper[V ~string](v V) string

func SnakeToPascal

func SnakeToPascal[V ~string](v V) string

func SnakeToPhrase

func SnakeToPhrase[V ~string](v V) string

Types

type CaseType

type CaseType string

func (CaseType) MarshalJSON

func (t CaseType) MarshalJSON() ([]byte, error)

func (CaseType) MarshalYAML

func (t CaseType) MarshalYAML() (interface{}, error)

func (*CaseType) Scan

func (t *CaseType) Scan(value interface{}) error

func (CaseType) String

func (t CaseType) String() string

func (*CaseType) UnmarshalJSON

func (t *CaseType) UnmarshalJSON(data []byte) error

func (*CaseType) UnmarshalYAML

func (t *CaseType) UnmarshalYAML(unmarshal func(interface{}) error) error

func (CaseType) Value

func (t CaseType) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL