Skip to content
This repository has been archived by the owner on May 29, 2018. It is now read-only.

Change SourceImports to ImportFromBinary to follow go/loader updates. #31

Merged
merged 1 commit into from
Feb 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type srcfileConfig struct {

PkgPatterns []string // pattern passed to `go list` (defaults to {"./..."})

SourceImports bool
ImportFromBinary bool
}

// unmarshalTypedConfig parses config from the Config field of the source unit.
Expand Down Expand Up @@ -160,7 +160,7 @@ func (c *srcfileConfig) apply() error {
loaderConfig.Build = &buildContext
}

loaderConfig.SourceImports = config.SourceImports
loaderConfig.ImportFromBinary = config.ImportFromBinary

if config.GOROOTForCmd == "" {
config.GOROOTForCmd = config.GOROOT
Expand Down
2 changes: 1 addition & 1 deletion graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ var allowErrorsInGraph = true
func doGraph(pkg *build.Package) (*gog.Output, error) {
importPath := pkg.ImportPath

if !loaderConfig.SourceImports {
if loaderConfig.ImportFromBinary {
imports := map[string]struct{}{}
for _, imp := range pkg.Imports {
imports[imp] = struct{}{}
Expand Down