utils

package
v0.0.0-...-699dfa3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BothZeroOrNot

func BothZeroOrNot(v1, v2 interface{}) bool

func CheckEmail

func CheckEmail(email string) bool

func ContainsFloat64

func ContainsFloat64(arr []float64, target float64) bool

func ContainsInt

func ContainsInt(arr []int, target int) bool

func ContainsInt64

func ContainsInt64(arr []int64, target int64) bool

func ContainsString

func ContainsString(arr []string, target string) bool

func DeepCopy

func DeepCopy(dst, src interface{}) error

refer : https://studygolang.com/articles/2118

func EscapeDoubleQuotes

func EscapeDoubleQuotes(str string) string

func GetUrlRoot

func GetUrlRoot(port string) string

func IsDebug

func IsDebug() bool

func IsZeroOfUnderlyingType

func IsZeroOfUnderlyingType(x interface{}) bool

refer : https://stackoverflow.com/a/13906031/8042600

func Lower1stCharacter

func Lower1stCharacter(ipt string) string

func Millisecond

func Millisecond(ms int64) time.Duration

func MkDirAll4Path

func MkDirAll4Path(p string) error

func MkDirAll4RelativePath

func MkDirAll4RelativePath(relativePath string) (string, error)

func ReadFile

func ReadFile(path string) ([]byte, error)

func SafeGetUserFromJWT

func SafeGetUserFromJWT(c *gin.Context) (model.User, bool)

func Upper1stCharacter

func Upper1stCharacter(ipt string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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