Not affecting me, but I ran into it while creating my PR, and I thought that you might wanted to know this. In the following snippet:
// UnmarshalJSON is the json unmarshalling function for Time internal type
func (t *Time) UnmarshalJSON(b []byte) error {
s := strings.Trim(string(b), "\"")
if s == "null" {
blank := Time(time.Time{})
t = &blank
return nil
}
pTime, err := time.Parse(zohoTimeLayout, s)
if err == nil {
ref := Time(pTime)
t = &ref
}
return err
}
t = &blank and t = &ref are ineffective. It has no effect to modify the receiver t. It does have effect to modify the value to which the receiver points. That would make e.g. *t = blank and *t = ref.
Not affecting me, but I ran into it while creating my PR, and I thought that you might wanted to know this. In the following snippet:
t = &blank
andt = &ref
are ineffective. It has no effect to modify the receivert
. It does have effect to modify the value to which the receiver points. That would make e.g.*t = blank
and*t = ref
.