utils

package
v0.0.0-...-29ce5d4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LoadLocationFromTZData func(name string, data []byte) (*time.Location, error)
	TZData                 []byte
)

if you use go 1.10 or higher, you can hack this util by these to avoid "TimeZone.zip not found" on Windows

Functions

func GetFromJsonString

func GetFromJsonString(jsonString, key string) (result string, err error)

GetFromJsonString returns json string

func GetGMTLocation

func GetGMTLocation() (*time.Location, error)

GetGMTLocation returns gmt location

func GetMD5Base64

func GetMD5Base64(bytes []byte) (base64Value string)

GetMD5Base64 returns base64Value

func GetTimeInFormatISO8601

func GetTimeInFormatISO8601() (timeStr string)

GetTimeInFormatISO8601 returns time in ISO format

func GetTimeInFormatRFC2616

func GetTimeInFormatRFC2616() (timeStr string)

GetTimeInFormatRFC2616 returns time in RFC format

func GetUUIDV4

func GetUUIDV4() (uuidHex string)

GetUUIDV4 returns uuidHex

func GetUrlFormedMap

func GetUrlFormedMap(source map[string]string) (urlEncoded string)

GetUrlFormedMap returns url formed map

func InitStructWithDefaultTag

func InitStructWithDefaultTag(bean interface{})

InitStructWithDefaultTag returns default struct

Types

This section is empty.

Jump to

Keyboard shortcuts

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