go-openapi / strfmt

openapi toolkit common string formats
Apache License 2.0
102 stars 62 forks source link

Methods for fulfil methods from encoding and gob packages #59

Closed Ompluscator closed 5 years ago

Ompluscator commented 5 years ago

Add methods for Date and DateTime to fulfil interfaces:

During struct serialisation, by using core package "encoding/gob", in case Date or DateTime are used as types for struct fields, error is thrown as result: "type strfmt.Date has no exported fields".

This commits adds those method, by reusing existing ones from time.Time struct.

codecov[bot] commented 5 years ago

Codecov Report

Merging #59 into master will increase coverage by 0.02%. The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #59      +/-   ##
=========================================
+ Coverage   83.17%   83.2%   +0.02%     
=========================================
  Files          10      10              
  Lines        1599    1625      +26     
=========================================
+ Hits         1330    1352      +22     
- Misses        198     200       +2     
- Partials       71      73       +2
Impacted Files Coverage Δ
date.go 88.88% <84.61%> (-0.82%) :arrow_down:
time.go 93% <84.61%> (-1.26%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6faa644...10cbedc. Read the comment docs.