-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plugin: Imports should be qualified when the base name doesn't match (#…
…233) Imports in plugin templates previously had this logic: If the package can be imported (it exists on the `GOPATH`), import it and determine its name. Otherwise, use the base path. This doesn't work if the package is not available on the `GOPATH` and has a `-` in the name. This commit makes two fixes to this behavior: - Always strip hyphens out of the import name. - If the base name and the package name do not match, always use a qualified import regardless of whether the package name was determined by importing it or guessed based on its base name. This should ensure that even if we guess the package name wrong, the code still works.
- Loading branch information
Showing
5 changed files
with
68 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
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
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 |
---|---|---|
|
@@ -20,4 +20,4 @@ | |
|
||
package main | ||
|
||
var version = "v0.2.0" | ||
var version = "v0.2.1" |