Documentation ¶
Overview ¶
Package undeclaredname defines an Analyzer that applies suggested fixes to errors of the type "undeclared name: %s".
Analyzer undeclaredname ¶
undeclaredname: suggested fixes for "undeclared name: <>"
This checker provides suggested fixes for type errors of the type "undeclared name: <>". It will either insert a new statement, such as:
<> :=
or a new function declaration, such as:
func <>(inferred parameters) { panic("implement me!") }
Index ¶
Constants ¶
View Source
const FixCategory = "undeclaredname" // recognized by gopls ApplyFix
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "undeclaredname", Doc: analysisinternal.MustExtractDoc(doc, "undeclaredname"), Requires: []*analysis.Analyzer{}, Run: run, RunDespiteErrors: true, URL: "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/undeclaredname", }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.