fix godoc for IsZero
it had the old behavior from v2
This commit is contained in:
parent
79c5bd36b6
commit
aa8aa51503
2 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 == ""
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue