|
@@ -18,6 +18,7 @@ import (
|
|
|
|
|
|
|
|
const (
|
|
const (
|
|
|
defaultTemplateFile = "coredhcp.go.template"
|
|
defaultTemplateFile = "coredhcp.go.template"
|
|
|
|
|
+ importBase = "github.com/coredhcp/coredhcp/"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
var (
|
|
@@ -52,6 +53,16 @@ func main() {
|
|
|
if pl == "" {
|
|
if pl == "" {
|
|
|
continue
|
|
continue
|
|
|
}
|
|
}
|
|
|
|
|
+ if !strings.ContainsRune(pl, '/') {
|
|
|
|
|
+ // A bare name was specified, not a full import path.
|
|
|
|
|
+ // Coredhcp plugins aren't in the standard library, and it's unlikely someone
|
|
|
|
|
+ // would put them at the base of $GOPATH/src.
|
|
|
|
|
+ // Assume this is one of the builtin plugins. If needed, use the -from option
|
|
|
|
|
+ // which always requires (and uses) exact paths
|
|
|
|
|
+
|
|
|
|
|
+ // XXX: we could also look into github.com/coredhcp/plugins
|
|
|
|
|
+ pl = importBase + pl
|
|
|
|
|
+ }
|
|
|
plugins[pl] = true
|
|
plugins[pl] = true
|
|
|
}
|
|
}
|
|
|
if *flagFromFile != "" {
|
|
if *flagFromFile != "" {
|