Versions in this module Expand all Collapse all v1 v1.3.0 Feb 2, 2022 Changes in this version + type Importer interface + AddImport func(pkgName, location string) string + type Locator struct + func NewLocator() *Locator + func (l *Locator) FindIdentType(context *LocatorContext, ref *ast.Ident) (TypeDiscovery, error) + func (l *Locator) FindSelectorType(context *LocatorContext, ref *ast.SelectorExpr) (TypeDiscovery, error) + type LocatorContext struct + func NewASTFileLocatorContext(astFile *ast.File, location string) *LocatorContext + func NewSingleLocationContext(location string) *LocatorContext + func (c *LocatorContext) AliasedLocation(alias string) (string, bool) + func (c *LocatorContext) CandidateLocations(alias string) []string + func (c *LocatorContext) LocalLocations() []string + func (c *LocatorContext) NonLocalNonAliasedLocations(alias string) []string + type Resolver struct + func NewResolver(importer Importer, locator *Locator) *Resolver + func (r *Resolver) ResolveType(context *LocatorContext, astType ast.Expr) (ast.Expr, error) + type TypeDiscovery struct + File *ast.File + Location string + Spec *ast.TypeSpec + type TypeNotFoundError struct + Name string + func (e *TypeNotFoundError) Error() string v1.2.0 Dec 7, 2021