utils

package
v0.0.0-...-3306650 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidEmailAddress = errors.New("invalid email address")
	ErrInvalidIcanSuffix   = errors.New("invalid ICAN suffix")
)

Functions

func AnyToString

func AnyToString(v interface{}) string

AnyToString converts any type to string

func Pointer

func Pointer[T any](v T) *T

Pointer is a helper to make a pointer to the given value.

func PrettyPrint

func PrettyPrint(v ...interface{})

PrettyPrint prints the given interface in a pretty format

func PrettyString

func PrettyString(v interface{}) string

PrettyString returns the given interface in a pretty format

func SanitizeEmail

func SanitizeEmail(s string) (string, error)

SanitizeEmail cleans email address from dots, dashes, etc

func StructToUrlValues

func StructToUrlValues(v interface{}) (url.Values, error)

StructToUrlValues converts a struct to a url.Values object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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