Closed xfoxawy closed 4 years ago
It’s not wrong, it’s intentional. Use the zero subpackage if you want this kind of behavior.
I noticed the documentation is kind of misleading though, “blank” should be changed to “null”.
should I extract this behavior in new method then?
No need, this behavior is already implemented in this zero subpackage: https://godoc.org/github.com/guregu/null/zero#StringFrom
example
sql.NullString{Value:"", Valid:true}