mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: temporary workaround for runtime.tmpl (#387)
* entc/gen: temporary workaround for runtime.tmpl * ci: golangci version
This commit is contained in:
@@ -19,11 +19,13 @@ import (
|
||||
// to their package variables.
|
||||
func init() {
|
||||
groupFields := schema.Group{}.Fields()
|
||||
_ = groupFields
|
||||
// groupDescName is the schema descriptor for name field.
|
||||
groupDescName := groupFields[0].Descriptor()
|
||||
// group.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
group.NameValidator = groupDescName.Validators[0].(func(string) error)
|
||||
userFields := schema.User{}.Fields()
|
||||
_ = userFields
|
||||
// userDescAge is the schema descriptor for age field.
|
||||
userDescAge := userFields[0].Descriptor()
|
||||
// user.AgeValidator is a validator for the "age" field. It is called by the builders before save.
|
||||
|
||||
Reference in New Issue
Block a user