From 6447f000a64680bf0468c18f95a9c0c121948f3e Mon Sep 17 00:00:00 2001 From: Vaughn Dice Date: Sat, 10 Aug 2019 10:03:37 -0600 Subject: [PATCH] ref(pkg/driver): remove pkg/driver; use cnab-go for needed logic --- Gopkg.lock | 7 +++---- cmd/duffle/main.go | 4 ++-- .../github.com/deislabs/cnab-go/driver/lookup}/lookup.go | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) rename {pkg/driver => vendor/github.com/deislabs/cnab-go/driver/lookup}/lookup.go (97%) diff --git a/Gopkg.lock b/Gopkg.lock index 5503f336..eb402ee0 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -200,7 +200,7 @@ version = "v1.1.1" [[projects]] - digest = "1:e86556f6f91e6c175ac44965165c1edbf75a978dd85442cef7415059f86a4bc3" + digest = "1:4e78f0d8768dbef11dc34305aa85259b9db277cd9df088f4beef0adc0b87e88a" name = "github.com/deislabs/cnab-go" packages = [ "action", @@ -213,6 +213,7 @@ "driver/command", "driver/docker", "driver/kubernetes", + "driver/lookup", "utils/crud", ] pruneopts = "NUT" @@ -1249,9 +1250,7 @@ "github.com/deislabs/cnab-go/claim", "github.com/deislabs/cnab-go/credentials", "github.com/deislabs/cnab-go/driver", - "github.com/deislabs/cnab-go/driver/command", - "github.com/deislabs/cnab-go/driver/docker", - "github.com/deislabs/cnab-go/driver/kubernetes", + "github.com/deislabs/cnab-go/driver/lookup", "github.com/deislabs/cnab-go/utils/crud", "github.com/docker/cli/cli/command", "github.com/docker/cli/cli/command/image/build", diff --git a/cmd/duffle/main.go b/cmd/duffle/main.go index 1e12cd81..3451a1b4 100644 --- a/cmd/duffle/main.go +++ b/cmd/duffle/main.go @@ -14,10 +14,10 @@ import ( "github.com/deislabs/cnab-go/claim" "github.com/deislabs/cnab-go/credentials" "github.com/deislabs/cnab-go/driver" + "github.com/deislabs/cnab-go/driver/lookup" "github.com/deislabs/cnab-go/utils/crud" "github.com/spf13/cobra" - duffleDriver "github.com/deislabs/duffle/pkg/driver" "github.com/deislabs/duffle/pkg/duffle/home" "github.com/deislabs/duffle/pkg/reference" ) @@ -112,7 +112,7 @@ func must(err error) { // prepareDriver prepares a driver per the user's request. func prepareDriver(driverName string, relMap string) (driver.Driver, error) { - driverImpl, err := duffleDriver.Lookup(driverName) + driverImpl, err := lookup.Lookup(driverName) if err != nil { return nil, err } diff --git a/pkg/driver/lookup.go b/vendor/github.com/deislabs/cnab-go/driver/lookup/lookup.go similarity index 97% rename from pkg/driver/lookup.go rename to vendor/github.com/deislabs/cnab-go/driver/lookup/lookup.go index bd05c207..e0d6f212 100644 --- a/pkg/driver/lookup.go +++ b/vendor/github.com/deislabs/cnab-go/driver/lookup/lookup.go @@ -1,4 +1,4 @@ -package driver +package lookup import ( "fmt"