Branch | Status | Coverage |
---|---|---|
master |
go-std is a library with reasonable options for dealing with nullable SQL and JSON values.
All types implement sql.Scanner
and driver.Valuer
, so you can use this library in place of sql.NullXXX
.
All types also implement: encoding.TextMarshaler
, encoding.TextUnmarshaler
, json.Marshaler
, json.Unmarshaler
and fmt.Stringer
.
std.Bool
: Nullable boolstd.Float
: Nullable float64std.String
: Nullable stringstd.Int
: Nullable int64std.Uint
: Nullable uint64std.Time
: Nullable Timestd.DateTime
: Nullable Time with ISO8601 formatstd.Date
: Nullable Time with ISO8601 (yyyy-mm-dd) format
go-std is licensed under the MIT license.