dst: github.com/dave/dst/decorator/resolver/goast Index | Files

package goast

import "github.com/dave/dst/decorator/resolver/goast"

Index

Package Files

resolver.go

type DecoratorResolver Uses

type DecoratorResolver struct {
    RestorerResolver resolver.RestorerResolver
    // contains filtered or unexported fields
}

DecoratorResolver is a simple ident resolver that parses the imports block of the file and resolves qualified identifiers using resolved package names. It is not possible to resolve identifiers in dot-imported packages without the full export data of the imported package, so this resolver will return an error if it encounters a dot-import. See gotypes.DecoratorResolver for a dot-imports capable ident resolver.

func New Uses

func New() *DecoratorResolver

func WithResolver Uses

func WithResolver(resolver resolver.RestorerResolver) *DecoratorResolver

func (*DecoratorResolver) ResolveIdent Uses

func (r *DecoratorResolver) ResolveIdent(file *ast.File, parent ast.Node, parentField string, id *ast.Ident) (string, error)

Package goast imports 7 packages (graph) and is imported by 1 packages. Updated 2019-01-19. Refresh now. Tools for package owners.