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 {
559
559
return nil
560
560
}
561
561
562
- func (ns Duration ) IsZero () bool { return time . Duration ( ns ) == 0 }
562
+ func (ns Duration ) IsZero () bool { return ns == 0 }
563
563
func (m StringSliceJSONFormat ) IsZero () bool { return len (m ) == 0 }
564
564
func (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 }
567
567
func (ns NullString ) IsZero () bool { return len (ns ) == 0 }
568
568
func (ns NullTime ) IsZero () bool { return time .Time (ns ).IsZero () }
569
569
func (n MapStringInterface ) IsZero () bool { return len (n ) == 0 }
570
570
func (m JSONArrayRawMessage ) IsZero () bool { return len (m ) == 0 || string (m ) == "[]" }
571
571
func (m JSONRawMessage ) IsZero () bool { return len (m ) == 0 || string (m ) == "null" }
572
572
func (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