Defs maps identifiers to the objects they define (including package names, dots "." of dot-imports, and blank "_" identifiers). For identifiers that do not denote objects (e.g., the package name in package clauses, or symbolic variables t in t := x.(type) of type switch headers), the corresponding objects are nil.

For an anonymous field, Defs returns the field *Var it defines.

Invariant: Defs[id] == nil || Defs[id].Pos() == id.Pos()

Defs is referenced in 0 repositories