Skip to content

Commit

Permalink
Tidy up imports
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Rüegg <simon@rueggs.ch>
  • Loading branch information
srueg committed Mar 31, 2020
1 parent cf9afb2 commit 172927f
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 99 deletions.
5 changes: 3 additions & 2 deletions cmd/orphans_test.go
@@ -1,10 +1,11 @@
package cmd

import (
"github.com/appuio/seiso/cfg"
"github.com/stretchr/testify/assert"
"regexp"
"testing"

"github.com/appuio/seiso/cfg"
"github.com/stretchr/testify/assert"
)

func Test_splitNamespaceAndImagestream(t *testing.T) {
Expand Down
94 changes: 4 additions & 90 deletions go.sum

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions pkg/cleanup/imagetags.go
Expand Up @@ -2,13 +2,14 @@ package cleanup

import (
"fmt"
"regexp"
"strings"
"time"

"github.com/appuio/seiso/pkg/openshift"
imagev1 "github.com/openshift/api/image/v1"
log "github.com/sirupsen/logrus"
"github.com/thoas/go-funk"
"regexp"
"strings"
"time"
)

// MatchOption type defines how the tags should be matched
Expand Down
3 changes: 2 additions & 1 deletion pkg/docker/image_test.go
@@ -1,8 +1,9 @@
package docker

import (
"github.com/stretchr/testify/assert"
"testing"

"github.com/stretchr/testify/assert"
)

const IMAGE = "appuio/oc"
Expand Down
4 changes: 3 additions & 1 deletion pkg/git/git.go
Expand Up @@ -2,10 +2,11 @@ package git

import (
"fmt"
"github.com/appuio/seiso/cfg"
"io"
"strings"

"github.com/appuio/seiso/cfg"

"gopkg.in/src-d/go-git.v4"
)

Expand Down Expand Up @@ -72,6 +73,7 @@ func GetTags(repoPath string, tagLimit int, sortTagBy SortOption) ([]string, err
return sortTags(commitTags, sortTagBy)
}

// GetGitCandidateList returns either git tags or git commit SHAs
func GetGitCandidateList(o *cfg.GitConfig) ([]string, error) {
if o.Tag {
candidates, err := GetTags(o.RepoPath, o.CommitLimit, SortOption(o.SortCriteria))
Expand Down
5 changes: 4 additions & 1 deletion pkg/kubernetes/util.go
@@ -1,14 +1,16 @@
package kubernetes

import (
"k8s.io/client-go/dynamic"
"strings"

"k8s.io/client-go/dynamic"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
)

type (
// Kubernetes defines the interface to interact with K8s
Kubernetes interface {
ResourceContains(namespace, value string, resource schema.GroupVersionResource) (bool, error)
}
Expand All @@ -18,6 +20,7 @@ type (
}
)

// New creates a new Kubernetes instance
func New() Kubernetes {
return &kubernetesImpl{}
}
Expand Down
1 change: 1 addition & 0 deletions pkg/openshift/imagestream.go
Expand Up @@ -3,6 +3,7 @@ package openshift
import (
"github.com/appuio/seiso/pkg/kubernetes"
imagev1 "github.com/openshift/api/image/v1"
log "github.com/sirupsen/logrus"
"github.com/thoas/go-funk"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down
3 changes: 2 additions & 1 deletion pkg/openshift/imagestream_test.go
Expand Up @@ -2,11 +2,12 @@ package openshift

import (
"errors"
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/thoas/go-funk"
"k8s.io/apimachinery/pkg/runtime/schema"
"testing"
)

type (
Expand Down

0 comments on commit 172927f

Please sign in to comment.