Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mxpv committed Aug 21, 2017
1 parent a990f6e commit cfce966
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions null_time.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ type NullTime struct {
Valid bool
}

// MarshalJSON implements json.Marshaler, it will encode null if this time is null.
func (t *NullTime) MarshalJSON() ([]byte, error) {
if !t.Valid {
return []byte("null"), nil
}
return t.Time.MarshalJSON()
}

// UnmarshalJSON implements json.Unmarshaler with JSON "null" support
func (t *NullTime) UnmarshalJSON(data []byte) error {
s := string(data)
Expand Down

0 comments on commit cfce966

Please sign in to comment.