typeindex

package
v0.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package typeindex defines an analyzer that provides a golang.org/x/tools/internal/typesinternal/typeindex.Index.

Like golang.org/x/tools/go/analysis/passes/inspect, it is intended to be used as a helper by other analyzers; it reports no diagnostics of its own.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "typeindex",
	Doc:  "indexes of type information for later passes",
	URL:  "https://pkg.go.dev/golang.org/x/tools/internal/analysisinternal/typeindex",
	Run: func(pass *analysis.Pass) (any, error) {
		inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
		return typeindex.New(inspect, pass.Pkg, pass.TypesInfo), nil
	},
	RunDespiteErrors: true,
	Requires:         []*analysis.Analyzer{inspect.Analyzer},
	ResultType:       reflect.TypeOf(new(typeindex.Index)),
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL