utils

package
v0.0.0-...-e612854 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: LGPL-2.1 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUnique

func AddUnique(arr []string, str string) []string

func CleanupString

func CleanupString(email string) string

CleanupString trims string and makes all lowercase

func FileExists

func FileExists(path string) bool

func IsImage

func IsImage(filetype string) bool

func IsValidIdentifier

func IsValidIdentifier(s string) bool

func MakeToken

func MakeToken(obj interface{}) string

func MatchDomain

func MatchDomain(spec string, domain string) bool

func RemoveString

func RemoveString(s []string, r string) []string

func SearchString

func SearchString(arr []string, needle string) bool

func SecureToken

func SecureToken() string

SecureToken creates a new random token

func ToJSONString

func ToJSONString(obj interface{}) string

func ValidateEmail

func ValidateEmail(e string) error

Types

type JSONMap

type JSONMap map[string]interface{}

func (JSONMap) Scan

func (j JSONMap) Scan(src interface{}) error

func (JSONMap) Value

func (j JSONMap) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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