File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1
1
# null int and string values
2
2
3
3
This module provides (yet another) alternative in dealing with integers and strings which may be null in your JSON or
4
- database. There are various different approaches to this, namely the built in [ https://golang.org/pkg/database/sql/#NullInt64 ] (golang SQL types )
5
- and the [ https://github.com/guregu/null ] (guregu null module ) which adds in JSON support. These are fine approaches but
4
+ database. There are various different approaches to this, namely the built in [ golang SQL types ] ( https://golang.org/pkg/database/sql/#NullInt64 )
5
+ and the [ guregu null module ] ( https://github.com/guregu/null ) which adds in JSON support. These are fine approaches but
6
6
both suffer from you having to deal with a struct type for your ids instead of a more natural int64 or string. That is fine
7
7
in some cases but I prefer to use more primitive types as assignment is more straightforward, simple equality works, etc.
8
8
You can’t perform that action at this time.
0 commit comments