Skip to content

E0502: A nil Schema attribute ​

s.Model and s.Field take attributes as values; one of them is nil, which says nothing about the model. Reported by every query of the model, orm.Check and vukavet.

Wrong ​

go
func (p *Post) Schema(s *orm.Schema) {
	s.Field(&p.Slug, orm.Slug{Unique: true}, nil)
}
go
func (p *Post) Schema(s *orm.Schema) {
	s.Field(&p.Slug, orm.Slug{Unique: true})
}

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.