sqlnull is utilities for working with sql.Null types in Go.
- Get the package
go get github.com/nktmys/sqlnull- Import the package
import "github.com/nktmys/sqlnull"This code:
str := "hello"
v1 := sqlnull.From(str)
v2 := sqlnull.FromPtr(&str)
p1 := sqlnull.Prt(str)
p2 := sqlnull.PrtOrNil(&str)
vp := sqlnull.ValuePtrOrNil(v1)Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.