checker

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 11 Imported by: 9 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(tree *parser.Tree, config *conf.Config) (reflect.Type, error)

Check calls Check on a disposable Checker.

func FieldIndex added in v1.15.8

func FieldIndex(c *Cache, env Nature, node ast.Node) (bool, []int, string)

func IsFastFunc added in v1.15.8

func IsFastFunc(fn reflect.Type, method bool) bool

func MethodIndex added in v1.15.8

func MethodIndex(c *Cache, env Nature, node ast.Node) (bool, int, string)

func ParseCheck added in v1.16.8

func ParseCheck(input string, config *conf.Config) (*parser.Tree, error)

ParseCheck parses input expression and checks its types. Also, it applies all provided patchers. In case of error, it returns error with a tree.

func TypedFuncIndex added in v1.15.8

func TypedFuncIndex(fn reflect.Type, method bool) (int, bool)

Types

type Checker added in v1.17.7

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

func (*Checker) Check added in v1.17.7

func (v *Checker) Check(tree *parser.Tree, config *conf.Config) (reflect.Type, error)

Check checks types of the expression tree. It returns type of the expression and error if any. If config is nil, then default configuration will be used.

func (*Checker) PatchAndCheck added in v1.17.7

func (v *Checker) PatchAndCheck(tree *parser.Tree, config *conf.Config) (reflect.Type, error)

PatchAndCheck applies all patchers and checks the tree.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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