Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TomWright/null

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

17 Commits

Repository files navigation

Build Status codecov Documentation

null

go get -u github.com/tomwright/null

Easily scan/marshal between standard types and null values.

The null package provides a set of structs that can be used as both scan and marshal sources and destinations, with the sole exception being that an empty value will be marshal'd to a value of null, and a null value will be unmarshal'd to an empty value.

The following types are available:

Determining validity

Each struct within the package has a property or func named Valid. Valid will be true if the provided value was present and not empty. When retrieving a value from the struct, a null should be used whenever Valid is false.

Additional types

Additional types will be added/maintained as needed or as requested. Feel free to submit any pull request you find useful or necessary.

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /