time.Time is an extremely well-used type that may as well be a primitive in REZI. (Due to implementing encoding.BinaryMarshaler, time.Time is already supported).
It would also be nice to add/confirm support for time.Duration as it should be fairly easy to include.
Add functions for proper encoding/decoding of time.Time. Add unit tests to confirm. Look towards behavior of json library to see how it handles that.
Support time.Duration - Start by adding unit tests to see if this isn't already supported due to underlying type of int64. Add functions for proper encoding/decoding of time.Duration if needed.
Add note to docs noting support for time.Time.
If time.Duration not already supported, do all below tests for durations as well.
[ ] Basic test of enc/decTime (primitives_test.go)
[ ] Enc and Dec test with Time values (primtives_test.go)
[ ] Test of Time within a map, Enc/Dec_Map_NoIndirection (maps_test.go)
[ ] Test of Time within a slice, Enc/Dec_Slice_NoIndirection (slices_test.go)
[ ] Test of Time written with Writer, Test_Writer_Enc (streams_test.go)
[ ] Test of Time read from sequence with Reader, Test_Reader_Dec_sequential (streams_test.go)
[ ] Test of Time read with Reader, new test Test_Reader_Dec_time (streams_test.go)
[ ] Test of Time within a non-trivial structure, Test_EncAndDec_NontrivialStructure (rezi_test.go)
it does support time.Time as-is, but note that Go does not serialize the Location name when converting a Time to bytes. We may want to drop a note in docs somewhere about that.
(Due to implementing encoding.BinaryMarshaler, time.Time is already supported).time.Time
is an extremely well-used type that may as well be a primitive in REZI.It would also be nice to add/confirm support for
time.Duration
as it should be fairly easy to include.Add functions for proper encoding/decoding of
time.Time
. Add unit tests to confirm. Look towards behavior ofjson
library to see how it handles that.Support
time.Duration
- Start by adding unit tests to see if this isn't already supported due to underlying type ofint64
. Add functions for proper encoding/decoding oftime.Duration
if needed.Add note to docs noting support for time.Time.
If time.Duration not already supported, do all below tests for durations as well.
[ ] Basic test of
enc
/decTime
(primitives_test.go)[ ]
Enc
andDec
test with Time values (primtives_test.go)[ ] Test of Time within a map,
Enc
/Dec_Map_NoIndirection
(maps_test.go)[ ] Test of Time within a slice,
Enc
/Dec_Slice_NoIndirection
(slices_test.go)[ ] Test of Time written with Writer,
Test_Writer_Enc
(streams_test.go)[ ] Test of Time read from sequence with Reader,
Test_Reader_Dec_sequential
(streams_test.go)[ ] Test of Time read with Reader, new test
Test_Reader_Dec_time
(streams_test.go)[ ] Test of Time within a non-trivial structure,
Test_EncAndDec_NontrivialStructure
(rezi_test.go)