volatiletech / null Goto Github PK
View Code? Open in Web Editor NEWThis project forked from guregu/null
reasonable handling of nullable values
License: Other
This project forked from guregu/null
reasonable handling of nullable values
License: Other
shouldn't the default behaviour of StringFrom
called with an empty string result in Valid == false
So the code would look something like this:
func StringFrom(s string) String {
valid := len(s) > 0
return NewString(s, valid)
}
No hard opinion here and we will probably not change this, as this would be a breaking change especially for sqlboiler, just wondering what the reason behind this decision is. Currently this leads to nullable strings on the DB are set per default to
an empty string instead of null, when passing values from an API model with omitempty
14.96 github.com/volatiletech/null
14.99 # github.com/volatiletech/null
14.99 /go/pkg/mod/github.com/volatiletech/[email protected]+incompatible/int32.go:138:34: cannot use seed (variable of type *randomize.Seed) as func() int64 value in argument to randomize.MediumInt
14.99 /go/pkg/mod/github.com/volatiletech/[email protected]+incompatible/json.go:162:38: cannot use seed (variable of type *randomize.Seed) as func() int64 value in argument to randomize.Str
14.99 /go/pkg/mod/github.com/volatiletech/[email protected]+incompatible/string.go:122:39: cannot use seed (variable of type *randomize.Seed) as func() int64 value in argument to randomize.FormattedString
14.99 /go/pkg/mod/github.com/volatiletech/[email protected]+incompatible/string.go:133:28: cannot use seed (variable of type *randomize.Seed) as func() int64 value in argument to randomize.Str
14.99 /go/pkg/mod/github.com/volatiletech/[email protected]+incompatible/time.go:128:27: cannot use seed (variable of type *randomize.Seed) as func() int64 value in argument to randomize.Date
happy to provide more info if you want
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.