code: func (f *file) lintErrors() {
  	for _, decl := range f.f.Decls {
  		gd, ok := decl.(*ast.GenDecl)
  		if !ok || gd.Tok != token.VAR {
  			continue
  		}
  		for _, spec := range gd.Specs {
  			spec := spec.(*ast.ValueSpec)
  			if len(spec.Names) != 1 || len(spec.Values) != 1 {
  				continue
  			}
  			ce, ok := spec.Values[0].(*ast.CallExpr)
  			if !ok {
  				continue
  			}
  			if !isPkgDot(ce.Fun, "errors", "New") && !isPkgDot(ce.Fun, "fmt", "Errorf") {
  				continue
  			}
  
  			id := spec.Names[0]
  			prefix := "err"
  			if id.IsExported() {
  				prefix = "Err"
  			}
  			if !strings.HasPrefix(id.Name, prefix) {
  				f.errorf(id, 0.9, category("naming"), "error var %s should have name of the form %sFoo", id.Name, prefix)
  			}
  		}
  	}
  }
docs: // lintErrors examines global error vars. It complains if they aren't named in the standard way.