File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -558,3 +558,17 @@ func (ns *NullDuration) UnmarshalJSON(data []byte) error {
558
558
ns .Valid = true
559
559
return nil
560
560
}
561
+
562
+ func (ns Duration ) IsZero () bool { return time .Duration (ns ) == 0 }
563
+ func (m StringSliceJSONFormat ) IsZero () bool { return len (m ) == 0 }
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 }
567
+ func (ns NullString ) IsZero () bool { return len (ns ) == 0 }
568
+ func (ns NullTime ) IsZero () bool { return time .Time (ns ).IsZero () }
569
+ func (n MapStringInterface ) IsZero () bool { return len (n ) == 0 }
570
+ func (m JSONArrayRawMessage ) IsZero () bool { return len (m ) == 0 }
571
+ func (m JSONRawMessage ) IsZero () bool { return len (m ) == 0 }
572
+ func (m NullJSONRawMessage ) IsZero () bool { return len (m ) == 0 }
573
+ func (ns NullInt64 ) IsZero () bool { return ! ns .Valid }
574
+ func (ns NullDuration ) IsZero () bool { return ! ns .Valid }
You can’t perform that action at this time.
0 commit comments