packages

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: Unlicense Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dir

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

Dir represents a directory containing go files.

func Load

func Load(pkgPatterns ...string) []Dir

Load looks for directories matching the passed in package patterns and returns Dir values for each directory that can be successfully imported and is found to match one of the patterns.

func (Dir) Import

func (d Dir) Import(path string) (string, *ast.Package, error)

Import imports path from srcDir, then loads the ast for that package. It ensures that the returned ast is for the package that would be imported by an import clause.

func (Dir) Packages

func (d Dir) Packages() map[string]*ast.Package

Packages returns the AST for all packages in d.

func (Dir) Path

func (d Dir) Path() string

Path returns the file path to d.

Jump to

Keyboard shortcuts

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