...

Package errorsas

import "golang.org/x/tools/go/analysis/passes/errorsas"
Overview
Index

Overview ▾

The errorsas package defines an Analyzer that checks that the second argument to errors.As is a pointer to a type implementing error.

Index ▾

Package files

errorsas.go

Constants

const Doc = `report passing non-pointer or non-error values to errors.As

The errorsas analysis reports calls to errors.As where the type
of the second argument is not a pointer to a type implementing error.`

Variables

var Analyzer = &analysis.Analyzer{
    Name:     "errorsas",
    Doc:      Doc,
    Requires: []*analysis.Analyzer{inspect.Analyzer},
    Run:      run,
}