utils

package
v0.0.0-...-85aee89 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeNil = time.Time{}

TimeNil 空时间

Functions

func Copy

func Copy(fromValue interface{}, toValue interface{}) error

Copy struct to strcut

func DayDiff

func DayDiff(start, end string) (int64, error)

DayDiff 时间间隔,单位天

func GetType

func GetType(target interface{}) string

GetType 获取类型 返回的 string 为 PkgPath + type

func PathExists

func PathExists(path string) (bool, error)

PathExists 路径文件是否存在

func StrToDate

func StrToDate(target string) (time.Time, error)

StrToDate return time

func StrToTime

func StrToTime(traget string) (time.Time, error)

StrToTime return time

func StringCombine

func StringCombine(values ...string) string

StringCombine 字符串合并

func TimeIsNil

func TimeIsNil(time time.Time) bool

TimeIsNil 判断时间是否为零值

func TimeToDateStr

func TimeToDateStr(time time.Time) string

TimeToDateStr 日期

func TimeToStr

func TimeToStr(time time.Time) string

TimeToStr return string

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