File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -559,16 +559,16 @@ func (ns *NullDuration) UnmarshalJSON(data []byte) error {
559559 return nil
560560}
561561
562- func (ns Duration ) IsZero () bool { return time . Duration ( ns ) == 0 }
562+ func (ns Duration ) IsZero () bool { return ns == 0 }
563563func (m StringSliceJSONFormat ) IsZero () bool { return len (m ) == 0 }
564564func (n StringSlicePipeDelimiter ) IsZero () bool { return len (n ) == 0 }
565- func (ns NullBool ) IsZero () bool { return ! ns .Valid }
566- func (ns FalsyNullBool ) IsZero () bool { return ! ns .Valid }
565+ func (ns NullBool ) IsZero () bool { return ! ns .Valid || ! ns . Bool }
566+ func (ns FalsyNullBool ) IsZero () bool { return ! ns .Valid || ! ns . Bool }
567567func (ns NullString ) IsZero () bool { return len (ns ) == 0 }
568568func (ns NullTime ) IsZero () bool { return time .Time (ns ).IsZero () }
569569func (n MapStringInterface ) IsZero () bool { return len (n ) == 0 }
570570func (m JSONArrayRawMessage ) IsZero () bool { return len (m ) == 0 || string (m ) == "[]" }
571571func (m JSONRawMessage ) IsZero () bool { return len (m ) == 0 || string (m ) == "null" }
572572func (m NullJSONRawMessage ) IsZero () bool { return len (m ) == 0 || string (m ) == "null" }
573- func (ns NullInt64 ) IsZero () bool { return ! ns .Valid }
574- func (ns NullDuration ) IsZero () bool { return ! ns .Valid }
573+ func (ns NullInt64 ) IsZero () bool { return ! ns .Valid || ns . Int == 0 }
574+ func (ns NullDuration ) IsZero () bool { return ! ns .Valid || ns . Duration == 0 }
You can’t perform that action at this time.
0 commit comments