E0425: A list entry that is no context processor
web.ContextProcessors(…) takes functions of one shape: func(ctx context.Context, deps…) (S, error), S a struct whose exported fields are the variables, declared in a package of its own (the packages main imports can't see main). The message says what is off: another shape, no exported field, a function of package main, web.Personal outside web.Browser, web.Auth without a gate. Reported by the compiler, by vuka vet and at boot.
Wrong
go
// settings/context.go
func Context(ctx context.Context) Settings { … }Right
go
// settings/context.go
type Vars struct{ Site Settings }
func Context(ctx context.Context, s *Store) (Vars, error) {
site, err := s.Load(ctx)
return Vars{Site: site}, err
}See context processors.