util

package
v0.0.0-...-499f22c Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotNumber         = errors.New("not number")
	ErrInvalidEthAddress = errors.New("invalid eth address")
)

Functions

func Clone

func Clone(inter interface{}) interface{}

func IsArrayOrSlice

func IsArrayOrSlice(item interface{}) bool

func IsNoEnvErr

func IsNoEnvErr(err error) bool

func IsPointer

func IsPointer(item interface{}) bool

func IsPointerOfPointer

func IsPointerOfPointer(item interface{}) bool

func IsStruct

func IsStruct(item interface{}) bool

func LoadDotenv

func LoadDotenv(filepaths ...string) error

func SetValueByName

func SetValueByName(name string, value interface{}, result interface{}) (err error)

func ValidateEmail

func ValidateEmail(email string) error

func ValidateEthAddress

func ValidateEthAddress(address string) error

func ValidateGE

func ValidateGE(min int, src interface{}) error

NOTE: is greater than or equal to `>=`

func ValidateLE

func ValidateLE(max int, src interface{}) error

NOTE: is less than or equal to `<=`

func ValidateLenBetween

func ValidateLenBetween(min, max int, src interface{}) error

func ValidateOnlyAlphaNumber

func ValidateOnlyAlphaNumber(src string) error

func ValidateOnlyAscii

func ValidateOnlyAscii(src string) error

TODO: should write test code

func ValidateOnlyNumber

func ValidateOnlyNumber(src string) error

func ValidateTelNum

func ValidateTelNum(telNum string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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