cache

package
v0.0.0-...-0c6a35b Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2019 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

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

File holds all the information we know about a file.

func (*File) GetAST

func (f *File) GetAST(ctx context.Context) *ast.File

func (*File) GetContent

func (f *File) GetContent(ctx context.Context) []byte

GetContent returns the contents of the file, reading it from file system if needed.

func (*File) GetFileSet

func (f *File) GetFileSet(ctx context.Context) *token.FileSet

func (*File) GetPackage

func (f *File) GetPackage(ctx context.Context) source.Package

func (*File) GetToken

func (f *File) GetToken(ctx context.Context) *token.File

func (*File) URI

func (f *File) URI() span.URI

type Package

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

Package contains the type information needed by the source package.

func (*Package) GetActionGraph

func (pkg *Package) GetActionGraph(ctx context.Context, a *analysis.Analyzer) (*source.Action, error)

func (*Package) GetErrors

func (pkg *Package) GetErrors() []packages.Error

func (*Package) GetFilenames

func (pkg *Package) GetFilenames() []string

func (*Package) GetSyntax

func (pkg *Package) GetSyntax() []*ast.File

func (*Package) GetTypes

func (pkg *Package) GetTypes() *types.Package

func (*Package) GetTypesInfo

func (pkg *Package) GetTypesInfo() *types.Info

func (*Package) IsIllTyped

func (pkg *Package) IsIllTyped() bool

type View

type View struct {

	// Config is the configuration used for the view's interaction with the
	// go/packages API. It is shared across all views.
	Config packages.Config
	// contains filtered or unexported fields
}

func NewView

func NewView(config *packages.Config) *View

func (*View) BackgroundContext

func (v *View) BackgroundContext() context.Context

func (*View) FileSet

func (v *View) FileSet() *token.FileSet

func (*View) GetFile

func (v *View) GetFile(ctx context.Context, uri span.URI) (source.File, error)

GetFile returns a File for the given URI. It will always succeed because it adds the file to the managed set if needed.

func (*View) SetContent

func (v *View) SetContent(ctx context.Context, uri span.URI, content []byte) error

SetContent sets the overlay contents for a file.

Jump to

Keyboard shortcuts

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