mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Update pkg structure to avoid circular import
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"sigs.k8s.io/kustomize/v3/pkg/commands/edit"
|
"sigs.k8s.io/kustomize/v3/pkg/commands/edit/util"
|
||||||
"sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
|
"sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
|
||||||
"sigs.k8s.io/kustomize/v3/pkg/fs"
|
"sigs.k8s.io/kustomize/v3/pkg/fs"
|
||||||
"sigs.k8s.io/kustomize/v3/pkg/patch"
|
"sigs.k8s.io/kustomize/v3/pkg/patch"
|
||||||
@@ -71,7 +71,7 @@ func (o *addPatchOptions) Complete(cmd *cobra.Command, args []string) error {
|
|||||||
|
|
||||||
// RunAddPatch runs addPatch command (do real work).
|
// RunAddPatch runs addPatch command (do real work).
|
||||||
func (o *addPatchOptions) RunAddPatch(fSys fs.FileSystem) error {
|
func (o *addPatchOptions) RunAddPatch(fSys fs.FileSystem) error {
|
||||||
patches, err := edit.GlobPatterns(fSys, o.patchFilePaths)
|
patches, err := util.GlobPatterns(fSys, o.patchFilePaths)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ package add
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"log"
|
"log"
|
||||||
"sigs.k8s.io/kustomize/v3/pkg/commands/edit"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
"sigs.k8s.io/kustomize/v3/pkg/commands/edit/util"
|
||||||
"sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
|
"sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
|
||||||
"sigs.k8s.io/kustomize/v3/pkg/fs"
|
"sigs.k8s.io/kustomize/v3/pkg/fs"
|
||||||
)
|
)
|
||||||
@@ -70,7 +70,7 @@ func (o *addResourceOptions) Complete(cmd *cobra.Command, args []string) error {
|
|||||||
|
|
||||||
// RunAddResource runs addResource command (do real work).
|
// RunAddResource runs addResource command (do real work).
|
||||||
func (o *addResourceOptions) RunAddResource(fSys fs.FileSystem) error {
|
func (o *addResourceOptions) RunAddResource(fSys fs.FileSystem) error {
|
||||||
resources, err := edit.GlobPatterns(fSys, o.resourceFilePaths)
|
resources, err := util.GlobPatterns(fSys, o.resourceFilePaths)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ package add
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sigs.k8s.io/kustomize/v3/pkg/commands/edit"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"sigs.k8s.io/kustomize/v3/pkg/commands/edit/util"
|
||||||
"sigs.k8s.io/kustomize/v3/pkg/fs"
|
"sigs.k8s.io/kustomize/v3/pkg/fs"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ func (a *flagsAndArgs) ExpandFileSource(fSys fs.FileSystem) error {
|
|||||||
} else {
|
} else {
|
||||||
patterns = append(patterns, s[0])
|
patterns = append(patterns, s[0])
|
||||||
}
|
}
|
||||||
result, err := edit.GlobPatterns(fSys, patterns)
|
result, err := util.GlobPatterns(fSys, patterns)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ package remove
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
"sigs.k8s.io/kustomize/v3/pkg/commands/edit"
|
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
"sigs.k8s.io/kustomize/v3/pkg/commands/edit/util"
|
||||||
"sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
|
"sigs.k8s.io/kustomize/v3/pkg/commands/kustfile"
|
||||||
"sigs.k8s.io/kustomize/v3/pkg/fs"
|
"sigs.k8s.io/kustomize/v3/pkg/fs"
|
||||||
"sigs.k8s.io/kustomize/v3/pkg/patch"
|
"sigs.k8s.io/kustomize/v3/pkg/patch"
|
||||||
@@ -59,7 +59,7 @@ func (o *removePatchOptions) Complete(cmd *cobra.Command, args []string) error {
|
|||||||
|
|
||||||
// RunRemovePatch runs removePatch command (do real work).
|
// RunRemovePatch runs removePatch command (do real work).
|
||||||
func (o *removePatchOptions) RunRemovePatch(fSys fs.FileSystem) error {
|
func (o *removePatchOptions) RunRemovePatch(fSys fs.FileSystem) error {
|
||||||
patches, err := edit.GlobPatterns(fSys, o.patchFilePaths)
|
patches, err := util.GlobPatterns(fSys, o.patchFilePaths)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright 2019 The Kubernetes Authors.
|
// Copyright 2019 The Kubernetes Authors.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
package edit
|
package util
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
Reference in New Issue
Block a user