utils

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFunctionName

func GetFunctionName(i interface{}) string

func IsInterfaceNil

func IsInterfaceNil(i interface{}) bool

func IsTypeEqual

func IsTypeEqual(v1 interface{}, v2 interface{}) bool

Types

type Datetime

type Datetime struct {
	// contains filtered or unexported fields
}

func NewDatetimeFromEpoch

func NewDatetimeFromEpoch(ep int64) *Datetime

func NewDatetimeFromString

func NewDatetimeFromString(t string) (*Datetime, error)

func NewDatetimeFromTime

func NewDatetimeFromTime(t time.Time) *Datetime

func NewDatetimeNow

func NewDatetimeNow() *Datetime

func (Datetime) GetTime

func (d Datetime) GetTime() time.Time

func (*Datetime) ToEpoch

func (d *Datetime) ToEpoch() int64

ToEpoch return epoch time in second by normalize time to UTC first

func (*Datetime) ToEpochMS

func (d *Datetime) ToEpochMS() int64

ToEpochMS return epoch time in ms by normalize time to UTC first

func (*Datetime) ToString

func (d *Datetime) ToString() string

Jump to

Keyboard shortcuts

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