Documentation
¶
Index ¶
- Constants
- Variables
- func RetryDo(fn func() error, intervalSecond int64) error
- func RetryDoTimes(times, intervalSecond int64, fn func() error) error
- func SetTimeZone() error
- func TimeExcWrap(fn func()) time.Duration
- func TimeNow() time.Time
- func TodayDate() string
- type JSONTime
- func (p *JSONTime) Add(d time.Duration) *JSONTime
- func (p JSONTime) Addr() *JSONTime
- func (p *JSONTime) Convert2Time() time.Time
- func (p *JSONTime) Date() *JSONTime
- func (p *JSONTime) FromDB(data []byte) error
- func (p *JSONTime) GobDecode(data []byte) error
- func (p *JSONTime) GobEncode() ([]byte, error)
- func (p *JSONTime) MarshalJSON() ([]byte, error)
- func (p *JSONTime) Scan(v interface{}) error
- func (p *JSONTime) SetByTime(timeVal time.Time)
- func (p *JSONTime) String() string
- func (p *JSONTime) StringFormat(layout string) string
- func (p *JSONTime) Time() time.Time
- func (p *JSONTime) ToDB() (b []byte, err error)
- func (p *JSONTime) UnmarshalJSON(data []byte) error
- func (p *JSONTime) Value() (driver.Value, error)
Constants ¶
View Source
const ( //TimeZone ... TimeZone = "Asia/Shanghai" //Custom ... Custom = "2006-01-02 15:04:05" //DateLayout ... DateLayout = "2006-01-02" )
Variables ¶
View Source
var TimeNowFunc = time.Now
TimeNowFunc ...
Functions ¶
func RetryDoTimes ¶
RetryDoTimes ...
Types ¶
type JSONTime ¶
JSONTime ...
func NewJSONTimeOfTime ¶
NewJSONTimeOfTime 时间转换为JSONTime
func (*JSONTime) StringFormat ¶
StringFormat 转换为固定格式字符串
func (*JSONTime) UnmarshalJSON ¶
UnmarshalJSON ...
Click to show internal directories.
Click to hide internal directories.