repositorypackage
0.0.0-20180402055224-a56dbdcddef2
Repository: https://github.com/v2pro/wombat.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# README
wombat

binding & validation & functional goodies.
implements api defined in v2pro/plz/util
package
Example
//go:generate go install github.com/v2pro/wombat/cmd/wombat-codegen
//go:generate $GOPATH/bin/wombat-codegen -pkg github.com/v2pro/wombat/example
func init() {
generic.Declare(func() {
plz.Max(int(0))
plz.Max(float64(0))
plz.Max(model.User{}, "Score")
})
}
func Demo_max_min(t *testing.T) {
should := require.New(t)
should.Equal(3, plz.Max(1, 3, 2))
should.Equal(float64(3), plz.Max(1.0, 3.0, 2.0))
should.Equal(model.User{3}, plz.Max(
model.User{1}, model.User{3}, model.User{2},
"Score"))
}
replace github.com/v2pro/wombat/example
with your package name.
you need call go generate
before compile