Documentation ¶
Index ¶
- func GetValueOrAlt(values url.Values, key, alt string) string
- func NegotiateContentType(r *http.Request, offers []string, defaultOffer string) string
- func ToDelimited(s string, del uint8) string
- func ToKebab(s string) string
- func ToScreamingDelimited(s string, del uint8, screaming bool) string
- func ToScreamingKebab(s string) string
- func ToScreamingSnake(s string) string
- func ToSnake(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetValueOrAlt ¶
GetValueOrAlt get value or alt
func NegotiateContentType ¶ added in v1.20.0
NegotiateContentType returns the best offered content type for the request's Accept header. If two offers match with equal weight, then the more specific offer is preferred. For example, text/* trumps */*. If two offers match with equal weight and specificity, then the offer earlier in the list is preferred. If no offers match, then defaultOffer is returned.
func ToDelimited ¶
ToDelimited converts a string to delimited.snake.case (in this case `del = '.'`)
func ToScreamingDelimited ¶
ToScreamingDelimited converts a string to SCREAMING.DELIMITED.SNAKE.CASE (in this case `del = '.'; screaming = true`) or delimited.snake.case (in this case `del = '.'; screaming = false`)
func ToScreamingKebab ¶
ToScreamingKebab converts a string to SCREAMING-KEBAB-CASE
func ToScreamingSnake ¶
ToScreamingSnake converts a string to SCREAMING_SNAKE_CASE
Types ¶
This section is empty.