Skip to content

Commit

Permalink
Moving the libraries back to pkg
Browse files Browse the repository at this point in the history
It actually seems to be the case that the pkg dir is a convention for CLI/cobra tools
  • Loading branch information
ccremer committed Mar 17, 2020
1 parent 948371c commit a3d0df2
Show file tree
Hide file tree
Showing 17 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package cmd
import (
"fmt"
"github.com/appuio/image-cleanup/cfg"
"github.com/appuio/image-cleanup/git"
"github.com/appuio/image-cleanup/openshift"
"github.com/appuio/image-cleanup/pkg/git"
"github.com/appuio/image-cleanup/pkg/openshift"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package cmd
import (
"fmt"
"github.com/appuio/image-cleanup/cfg"
"github.com/appuio/image-cleanup/cleanup"
"github.com/appuio/image-cleanup/git"
"github.com/appuio/image-cleanup/openshift"
"github.com/appuio/image-cleanup/pkg/cleanup"
"github.com/appuio/image-cleanup/pkg/git"
"github.com/appuio/image-cleanup/pkg/openshift"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/orphans.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"errors"
"fmt"
"github.com/appuio/image-cleanup/cfg"
"github.com/appuio/image-cleanup/cleanup"
"github.com/appuio/image-cleanup/git"
"github.com/appuio/image-cleanup/openshift"
"github.com/appuio/image-cleanup/pkg/cleanup"
"github.com/appuio/image-cleanup/pkg/git"
"github.com/appuio/image-cleanup/pkg/openshift"
"github.com/karrick/tparse"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cleanup/cleanup.go → pkg/cleanup/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cleanup

import (
"fmt"
"github.com/appuio/image-cleanup/openshift"
"github.com/appuio/image-cleanup/pkg/openshift"
imagev1 "github.com/openshift/api/image/v1"
log "github.com/sirupsen/logrus"
"github.com/thoas/go-funk"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions git/git_test.go → pkg/git/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import (

func Test_GetCommitHashes(t *testing.T) {
commitLimit := 2
commitHashes, err := GetCommitHashes("../", commitLimit) // Open repository from root dir
commitHashes, err := GetCommitHashes("../../", commitLimit) // Open repository from root dir

assert.NoError(t, err)
assert.Len(t, commitHashes, commitLimit)
}

func Test_GetCommitHashesAll(t *testing.T) {
commitLimit := -1
_, err := GetCommitHashes("../", commitLimit) // Open repository from root dir
_, err := GetCommitHashes("../../", commitLimit) // Open repository from root dir

assert.NoError(t, err)
}
Expand Down Expand Up @@ -48,7 +48,7 @@ func Test_GetTagsSortedByVersion(t *testing.T) {

func Test_GetAllTags(t *testing.T) {
commitLimit := -1
_, err := GetTags("../", commitLimit, "version") // Open repository from root dir
_, err := GetTags("../../", commitLimit, "version") // Open repository from root dir

assert.NoError(t, err)
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion openshift/clients.go → pkg/openshift/clients.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package openshift

import (
"github.com/appuio/image-cleanup/kubernetes"
"github.com/appuio/image-cleanup/pkg/kubernetes"
image "github.com/openshift/client-go/image/clientset/versioned/typed/image/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion openshift/imagestream.go → pkg/openshift/imagestream.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package openshift

import (
"github.com/appuio/image-cleanup/kubernetes"
"github.com/appuio/image-cleanup/pkg/kubernetes"
imagev1 "github.com/openshift/api/image/v1"
"github.com/thoas/go-funk"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
File renamed without changes.

0 comments on commit a3d0df2

Please sign in to comment.