Documentation
¶
Index ¶
- func Into[T any](dst *T, data []byte, unmarshalers ...func([]byte) (T, error)) error
- func IntoArray[T any](dst *[]T, data []byte, unmarshalers ...func([]byte) (T, error)) error
- func IsReservedKeyword(s string) bool
- func IsValidIdent(s string) bool
- func OneOf[T any](data []byte, unmarshalers ...func([]byte) (T, error)) (T, error)
- func OneOfArray[T any](data []byte, unmarshalers ...func([]byte) (T, error)) ([]T, error)
- func RequireFields(dst json.RawMessage, fields ...string) error
- func RequireOneOfFields(dst json.RawMessage, fields ...string) error
- func ToCamel(s string) string
- func ToCamelLower(s string) string
- func ToCamelUpper(s string) string
- func ToCamelWithAcronyms(s string, acronyms map[string]bool) string
- func ToDelimited(s string, delimiter uint8) string
- func ToKebab(s string) string
- func ToLowerCamel(s string) string
- func ToLowerCamelWithAcronyms(s string, acronyms map[string]bool) string
- func ToScreamingDelimited(s string, delimiter uint8, ignore uint8, screaming bool) string
- func ToScreamingKebab(s string) string
- func ToScreamingSnake(s string) string
- func ToSnake(s string) string
- func ToSnakeWithIgnore(s string, ignore uint8) string
- func TryUnmarshal[T any](data []byte) (T, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsReservedKeyword ¶
func IsValidIdent ¶
func OneOfArray ¶
same as one of but returns an array of _Child
func RequireFields ¶
func RequireFields( dst json.RawMessage, fields ...string, ) error
func RequireOneOfFields ¶
func RequireOneOfFields( dst json.RawMessage, fields ...string, ) error
func ToCamelLower ¶
func ToCamelUpper ¶
func ToCamelWithAcronyms ¶
ToCamel converts a string to CamelCase
func ToDelimited ¶
ToDelimited converts a string to delimited.snake.case (in this case `delimiter = '.'`)
func ToLowerCamel ¶
ToLowerCamel converts a string to lowerCamelCase
func ToLowerCamelWithAcronyms ¶
ToLowerCamel converts a string to lowerCamelCase
func ToScreamingDelimited ¶
ToScreamingDelimited converts a string to SCREAMING.DELIMITED.SNAKE.CASE (in this case `delimiter = '.'; screaming = true`) or delimited.snake.case (in this case `delimiter = '.'; screaming = false`)
func ToScreamingKebab ¶
ToScreamingKebab converts a string to SCREAMING-KEBAB-CASE
func ToScreamingSnake ¶
ToScreamingSnake converts a string to SCREAMING_SNAKE_CASE
func ToSnakeWithIgnore ¶
func TryUnmarshal ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.