This repository has been archived by the owner on Feb 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parameterize import mode by go version
- Loading branch information
Showing
3 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// +build !go1.6 | ||
|
||
package vsolver | ||
|
||
import "go/build" | ||
|
||
// analysisImportMode returns the import mode used for build.Import() calls for | ||
// standard package analysis. | ||
// | ||
// build.NoVendor was added in go1.6, so we have to omit it here. | ||
func analysisImportMode() build.ImportMode { | ||
return build.ImportComment | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// +build go1.6 | ||
|
||
package vsolver | ||
|
||
import "go/build" | ||
|
||
// analysisImportMode returns the import mode used for build.Import() calls for | ||
// standard package analysis. | ||
func analysisImportMode() build.ImportMode { | ||
return build.ImportComment | build.IgnoreVendor | ||
} |