gosource

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GOROOT added in v0.11.3

func GOROOT() (string, error)

GOROOT runs "go env GOROOT" to determine the GOROOT and returns it. After the first call the path is cached in the goroot package variable and the stored value is returned.

Types

type Resolver

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

Resolver determines all Go Source files that are imported by Go-Files in the passed paths

func NewResolver

func NewResolver(debugLogFn func(string, ...interface{}), env []string, goDirs ...string) *Resolver

NewResolver returns a resolver that resolves all go source files in the GoDirs and it's imports to filepaths. env specifies the environment variables to use during resolving. If empty or nil the default Go environment is used.

func (*Resolver) Resolve

func (r *Resolver) Resolve() ([]string, error)

Resolve returns the Go source files in the passed directories plus all source files of the imported packages. Testfiles and stdlib dependencies are ignored.

Jump to

Keyboard shortcuts

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