util

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateSRI

func CalculateSRI(filename string) (string, error)

Function to calculate SRI hash

func CutStringFromMatch

func CutStringFromMatch(input, pattern string) string

func FirstToLower

func FirstToLower(s string) string

func FirstToUpper

func FirstToUpper(s string) string

func GetRealIP added in v0.0.4

func GetRealIP(r *http.Request) string

func JoinBaseURL added in v0.0.4

func JoinBaseURL(baseURL, path string) string

func MergeClasses

func MergeClasses(baseClasses, additionalClasses string) string

mergeClasses merges default classes with optionally provided overrides or additions.

func SplitIntoWords

func SplitIntoWords(s string) []string

SplitIntoWords splits the string into words based on non-alphanumeric characters

func ToCamel

func ToCamel(s string) string

toCamel converts string to camelCase

func ToConstant

func ToConstant(s string) string

toConstant converts string to CONSTANT_CASE

func ToKebab

func ToKebab(s string) string

toKebab converts string to kebab-case

func ToPascal

func ToPascal(s string) string

toPascal converts string to PascalCase

func ToSnake

func ToSnake(s string) string

toSnake converts string to snake_case

func ToTitle

func ToTitle(s string) string

toTitle converts string to Title Case

Types

This section is empty.

Jump to

Keyboard shortcuts

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