E0421: Two context processors give one variable
Each exported field of a context processor's result is a template variable, named after the field in lower camel case: Me is me. Two processors in main's web.ContextProcessors(…) giving the same name — or one processor listed twice — would leave a template's me meaning either, so the build fails, naming both processors and where they are declared. Reported by the compiler, by vuka vet and at boot.
Wrong
go
// users/context.go
type Vars struct{ Me *User }
// admin/context.go
type Vars struct{ Me *Staff }
web.ContextProcessors(users.Context, admin.Context)Right
go
// admin/context.go
type Vars struct{ Staff *Staff }
web.ContextProcessors(users.Context, admin.Context)See context processors.