Skip to content

Commit

Permalink
pkg/receipt: move under pkg/installation
Browse files Browse the repository at this point in the history
Moving to somewhere more logically relevant.

Signed-off-by: Ahmet Alp Balkan <[email protected]>
  • Loading branch information
ahmetb committed Jul 21, 2019
1 parent 2364ae4 commit d1bad6b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/installation/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package receipt

import (
"os"
"path/filepath"
"testing"

"github.com/google/go-cmp/cmp"
Expand Down Expand Up @@ -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)
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/installation/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/installation/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d1bad6b

Please sign in to comment.