Skip to content

Commit

Permalink
fix godoc for IsZero
Browse files Browse the repository at this point in the history
it had the old behavior from v2
  • Loading branch information
guregu committed Feb 28, 2016
1 parent 79c5bd3 commit aa8aa51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions string.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ func (s String) Ptr() *string {
return &s.String
}

// IsZero returns true for null or empty strings, for future omitempty support. (Go 1.4?)
// Will return false s if blank but non-null.
// IsZero returns true for null strings, for potential future omitempty support.
func (s String) IsZero() bool {
return !s.Valid
}
2 changes: 1 addition & 1 deletion zero/string.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (s String) Ptr() *string {
return &s.String
}

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

0 comments on commit aa8aa51

Please sign in to comment.