Skip to content

Commit aa8aa51

Browse files
committed
fix godoc for IsZero
it had the old behavior from v2
1 parent 79c5bd3 commit aa8aa51

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

string.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ func (s String) Ptr() *string {
9595
return &s.String
9696
}
9797

98-
// IsZero returns true for null or empty strings, for future omitempty support. (Go 1.4?)
99-
// Will return false s if blank but non-null.
98+
// IsZero returns true for null strings, for potential future omitempty support.
10099
func (s String) IsZero() bool {
101100
return !s.Valid
102101
}

zero/string.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (s String) Ptr() *string {
9797
return &s.String
9898
}
9999

100-
// IsZero returns true for null or empty strings, for future omitempty support. (Go 1.4?)
100+
// IsZero returns true for null or empty strings, for potential future omitempty support.
101101
func (s String) IsZero() bool {
102102
return !s.Valid || s.String == ""
103103
}

0 commit comments

Comments
 (0)