E0207: Attribute on the wrong kind of declaration
An attribute type can say where it goes with @vuka.Targets(vuka.OnField | …), and decorators go on functions, methods and types. This one is on a declaration its target doesn't allow (a field attribute on a function, a decorator on a var).
Wrong
vuka
@vuka.Targets(vuka.OnField)
type Char struct{ Max int }
@Char{Max: 1}
func a() {}Right
vuka
@vuka.Targets(vuka.OnField)
type Char struct{ Max int }
type Post struct {
Title string @Char{Max: 200}
}