Documentation ¶
Index ¶
- func CheckHash(input, hash string) error
- func Decrypt(encryptedString string, keys ...string) (string, error)
- func Encrypt(stringToEncrypt string, keys ...string) (string, error)
- func ExtractContent(content string) (string, string)
- func FirstError(errors ...error) error
- func GenerateHash(input string) (string, error)
- func GetFunctionName(i interface{}) string
- func GetStructField(entity interface{}, field string) reflect.Value
- func MarkdownToHtml(content string) (string, error)
- func Repeat[T comparable](input T, time int) []T
- func SanitizeMarkdown(html string) string
- func SanitizePlainText(html string) string
- func SliceAppendIfNotExists[T comparable](slice []T, newItem T, checkExists func(T) bool) []T
- func SliceContains[T comparable](slice []T, element T) bool
- func SliceFilter[T comparable](slice []T, predicate func(T) bool) []T
- func SliceMap[T comparable, R comparable](slice []T, mapper func(T) R) []R
- func SliceOverlap[T comparable](slice1 []T, slice2 []T) []T
- func Url(path string) string
- type HashConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractContent ¶
func FirstError ¶
FirstError return the first error in a list of errors
func GenerateHash ¶
func GetFunctionName ¶
func GetFunctionName(i interface{}) string
func GetStructField ¶
GetStructField returns the value of a struct field
func MarkdownToHtml ¶
func Repeat ¶
func Repeat[T comparable](input T, time int) []T
func SanitizeMarkdown ¶
func SanitizePlainText ¶
func SliceAppendIfNotExists ¶
func SliceAppendIfNotExists[T comparable](slice []T, newItem T, checkExists func(T) bool) []T
func SliceContains ¶
func SliceContains[T comparable](slice []T, element T) bool
func SliceFilter ¶
func SliceFilter[T comparable](slice []T, predicate func(T) bool) []T
func SliceMap ¶
func SliceMap[T comparable, R comparable](slice []T, mapper func(T) R) []R
func SliceOverlap ¶
func SliceOverlap[T comparable](slice1 []T, slice2 []T) []T
Types ¶
Click to show internal directories.
Click to hide internal directories.