initialize

package
v0.391.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:             "initialize",
	Doc:              "loads data to be used by other analyzers in the schema extractor pass",
	Run:              Run,
	ResultType:       reflect.TypeFor[Result](),
	RunDespiteErrors: true,
}

Analyzer prepares data prior to the schema extractor runs, e.g. loads FTL types for reference by other analyzers.

Functions

func Run

func Run(pass *analysis.Pass) (interface{}, error)

Types

type Result

type Result struct {
	// contains filtered or unexported fields
}

func (Result) IsContextType

func (r Result) IsContextType(typ types.Type) bool

IsContextType will return true if the provided type is assertable to the `context.Context` type.

func (Result) IsFtlErrorType

func (r Result) IsFtlErrorType(typ types.Type) bool

IsFtlErrorType will return true if the provided type is assertable to the `builtin.error` type.

Jump to

Keyboard shortcuts

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