diff --git a/pkg/installation/install.go b/pkg/installation/install.go index e00399c2..426cba71 100644 --- a/pkg/installation/install.go +++ b/pkg/installation/install.go @@ -26,8 +26,8 @@ import ( "sigs.k8s.io/krew/pkg/download" "sigs.k8s.io/krew/pkg/environment" "sigs.k8s.io/krew/pkg/index" + "sigs.k8s.io/krew/pkg/installation/receipt" "sigs.k8s.io/krew/pkg/pathutil" - "sigs.k8s.io/krew/pkg/receipt" ) // Plugin Lifecycle Errors diff --git a/pkg/receipt/receipt.go b/pkg/installation/receipt/receipt.go similarity index 100% rename from pkg/receipt/receipt.go rename to pkg/installation/receipt/receipt.go diff --git a/pkg/receipt/receipt_test.go b/pkg/installation/receipt/receipt_test.go similarity index 96% rename from pkg/receipt/receipt_test.go rename to pkg/installation/receipt/receipt_test.go index 3389f83c..6e380c69 100644 --- a/pkg/receipt/receipt_test.go +++ b/pkg/installation/receipt/receipt_test.go @@ -16,7 +16,6 @@ package receipt import ( "os" - "path/filepath" "testing" "github.com/google/go-cmp/cmp" @@ -65,7 +64,7 @@ func TestLoad(t *testing.T) { } func TestLoad_preservesNonExistsError(t *testing.T) { - _, err := Load(filepath.Join("foo", "non-existing.yaml")) + _, err := Load("non-existing.yaml") if !os.IsNotExist(err) { t.Fatalf("returned error is not ENOENT: %+v", err) } diff --git a/pkg/installation/upgrade.go b/pkg/installation/upgrade.go index e0abb988..5a5b3257 100644 --- a/pkg/installation/upgrade.go +++ b/pkg/installation/upgrade.go @@ -18,13 +18,13 @@ import ( "io/ioutil" "os" + "github.com/golang/glog" + "github.com/pkg/errors" + "sigs.k8s.io/krew/pkg/environment" "sigs.k8s.io/krew/pkg/index" + "sigs.k8s.io/krew/pkg/installation/receipt" "sigs.k8s.io/krew/pkg/installation/semver" - "sigs.k8s.io/krew/pkg/receipt" - - "github.com/golang/glog" - "github.com/pkg/errors" ) // Upgrade will reinstall and delete the old plugin. The operation tries diff --git a/pkg/installation/util.go b/pkg/installation/util.go index d8a29023..690ff30c 100644 --- a/pkg/installation/util.go +++ b/pkg/installation/util.go @@ -22,8 +22,8 @@ import ( "sigs.k8s.io/krew/pkg/constants" "sigs.k8s.io/krew/pkg/index" + "sigs.k8s.io/krew/pkg/installation/receipt" "sigs.k8s.io/krew/pkg/pathutil" - "sigs.k8s.io/krew/pkg/receipt" ) func pluginVersionFromPath(installPath, pluginPath string) (string, error) {