Skip to content

Commit

Permalink
Merge pull request #312 from monopole/fixSomeImports
Browse files Browse the repository at this point in the history
Remove some unnecessary import renames.
  • Loading branch information
k8s-ci-robot authored Sep 4, 2018
2 parents 694d809 + 340cb2b commit 95f5bec
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion pkg/patch/jsonpatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package patch

import (
yamlpatch "github.com/krishicks/yaml-patch"
"github.com/krishicks/yaml-patch"
)

// PatchJson6902 represents a json patch for an object
Expand Down
7 changes: 3 additions & 4 deletions pkg/patch/transformer/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ package transformer
import (
"fmt"

jsonpatch "github.com/evanphx/json-patch"
yamlpatch "github.com/krishicks/yaml-patch"
"k8s.io/apimachinery/pkg/runtime/schema"

"github.com/evanphx/json-patch"
"github.com/krishicks/yaml-patch"
"github.com/kubernetes-sigs/kustomize/pkg/loader"
"github.com/kubernetes-sigs/kustomize/pkg/patch"
"github.com/kubernetes-sigs/kustomize/pkg/resource"
"github.com/kubernetes-sigs/kustomize/pkg/transformers"
"k8s.io/apimachinery/pkg/runtime/schema"
)

// PatchJson6902Factory makes PatchJson6902 transformers.
Expand Down
3 changes: 1 addition & 2 deletions pkg/patch/transformer/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ import (
"strings"
"testing"

yaml "gopkg.in/yaml.v2"

"github.com/kubernetes-sigs/kustomize/pkg/internal/loadertest"
"github.com/kubernetes-sigs/kustomize/pkg/patch"
"gopkg.in/yaml.v2"
)

func TestNewPatchJson6902FactoryNull(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions pkg/patch/transformer/patchjson6902json.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ limitations under the License.
package transformer

import (
jsonpatch "github.com/evanphx/json-patch"

"github.com/evanphx/json-patch"
"github.com/kubernetes-sigs/kustomize/pkg/resmap"
"github.com/kubernetes-sigs/kustomize/pkg/resource"
"github.com/kubernetes-sigs/kustomize/pkg/transformers"
Expand Down
3 changes: 1 addition & 2 deletions pkg/patch/transformer/patchjson6902json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import (
"reflect"
"testing"

jsonpatch "github.com/evanphx/json-patch"

"github.com/evanphx/json-patch"
"github.com/kubernetes-sigs/kustomize/pkg/resmap"
"github.com/kubernetes-sigs/kustomize/pkg/resource"
)
Expand Down
3 changes: 1 addition & 2 deletions pkg/patch/transformer/patchjson6902yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ package transformer

import (
"github.com/ghodss/yaml"
yamlpatch "github.com/krishicks/yaml-patch"

"github.com/krishicks/yaml-patch"
"github.com/kubernetes-sigs/kustomize/pkg/resmap"
"github.com/kubernetes-sigs/kustomize/pkg/resource"
"github.com/kubernetes-sigs/kustomize/pkg/transformers"
Expand Down
2 changes: 1 addition & 1 deletion pkg/patch/transformer/patchjson6902yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"reflect"
"testing"

yamlpatch "github.com/krishicks/yaml-patch"
"github.com/krishicks/yaml-patch"
"github.com/kubernetes-sigs/kustomize/pkg/resmap"
"github.com/kubernetes-sigs/kustomize/pkg/resource"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down
2 changes: 1 addition & 1 deletion pkg/patch/transformer/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
func findTargetObj(m resmap.ResMap, targetId resource.ResId) (*resource.Resource, error) {
matchedIds := m.FindByGVKN(targetId)
if targetId.Namespace() != "" {
ids := []resource.ResId{}
var ids []resource.ResId
for _, id := range matchedIds {
if id.Namespace() == targetId.Namespace() {
ids = append(ids, id)
Expand Down

0 comments on commit 95f5bec

Please sign in to comment.