package
module
Version:
v0.0.0-...-86c5cad
Opens a new window with list of versions in this module.
Published: Aug 25, 2019
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
go 时间类型
type Time time.Time
- 实现了json UnmarshalJSON MarshalJSON 接口,
- 主要是 UnmarshalJSON 在时间解析时可以支持多种格式的解析,
- 解析空字符串 "" 会初始化一个时间类型而不是得到一个 " parsing time """" as ""2006-01-02T15:04:05Z07:00"": cannot parse """ as "2006" "
- 实现了database/sql 的 Value Scan 接口。便于数据库操作
Documentation
¶
View Source
const DatabaseTimeFormat = "2006-01-02 15:04:05"
Scan implements the sql.Scanner interface
Source Files
¶
Click to show internal directories.
Click to hide internal directories.