util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExist

func FileExist(path string) bool

func GetCurrentTime

func GetCurrentTime() string

func GetDateStr

func GetDateStr() string

GetDateStr returns formatted current time with the year, month and day.

func GetOwnerAndNameFromId

func GetOwnerAndNameFromId(id string) (string, string)

func GetTimeDay

func GetTimeDay(day int) string

GetTimeDay returns the time after the specified duration(day).

func GetTimeFromTimestamp

func GetTimeFromTimestamp(stamp int64) string

func GetTimeHour

func GetTimeHour(hour int) string

GetTimeHour returns the time after the specified duration(hour).

func GetTimeMinute

func GetTimeMinute(minute int) string

GetTimeMinute returns the time after the specified duration(minute).

func GetTimeMonth

func GetTimeMonth(month int) string

GetTimeMonth returns the time after the specified duration(month).

func GetTimeYear

func GetTimeYear(year int) string

GetTimeYear returns the time after the specified duration(year).

func JsonToStruct

func JsonToStruct(data string, v interface{}) error

func ListFiles

func ListFiles(path string) []string

func ReadStringFromPath

func ReadStringFromPath(path string) string

func String2Time

func String2Time(value string) (time.Time, error)

func StructToJson

func StructToJson(v interface{}) string

func Time2String

func Time2String(t time.Time) string

func UploadFileToStorage

func UploadFileToStorage(name string, fileBytes []byte) string

func UploadPic

func UploadPic(name string, text string) (src string)

func WriteStringToPath

func WriteStringToPath(s string, path string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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