mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-30 18:01:21 +00:00
Fix some nits in the crawler and elsewhere.
This commit is contained in:
@@ -31,10 +31,6 @@ func newCmdAddBase(fSys filesys.FileSystem) *cobra.Command {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = o.Complete(cmd, args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return o.RunAddBase(fSys)
|
||||
},
|
||||
}
|
||||
@@ -50,11 +46,6 @@ func (o *addBaseOptions) Validate(args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Complete completes addBase command.
|
||||
func (o *addBaseOptions) Complete(cmd *cobra.Command, args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// RunAddBase runs addBase command (do real work).
|
||||
func (o *addBaseOptions) RunAddBase(fSys filesys.FileSystem) error {
|
||||
mf, err := kustfile.NewKustomizationFile(fSys)
|
||||
|
||||
@@ -32,10 +32,6 @@ func newCmdAddPatch(fSys filesys.FileSystem) *cobra.Command {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = o.Complete(cmd, args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return o.RunAddPatch(fSys)
|
||||
},
|
||||
}
|
||||
@@ -51,11 +47,6 @@ func (o *addPatchOptions) Validate(args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Complete completes addPatch command.
|
||||
func (o *addPatchOptions) Complete(cmd *cobra.Command, args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// RunAddPatch runs addPatch command (do real work).
|
||||
func (o *addPatchOptions) RunAddPatch(fSys filesys.FileSystem) error {
|
||||
patches, err := util.GlobPatterns(fSys, o.patchFilePaths)
|
||||
|
||||
@@ -31,10 +31,6 @@ func newCmdAddResource(fSys filesys.FileSystem) *cobra.Command {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = o.Complete(cmd, args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return o.RunAddResource(fSys)
|
||||
},
|
||||
}
|
||||
@@ -50,11 +46,6 @@ func (o *addResourceOptions) Validate(args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Complete completes addResource command.
|
||||
func (o *addResourceOptions) Complete(cmd *cobra.Command, args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// RunAddResource runs addResource command (do real work).
|
||||
func (o *addResourceOptions) RunAddResource(fSys filesys.FileSystem) error {
|
||||
resources, err := util.GlobPatterns(fSys, o.resourceFilePaths)
|
||||
|
||||
@@ -34,10 +34,6 @@ func newCmdRemovePatch(fSys filesys.FileSystem) *cobra.Command {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = o.Complete(cmd, args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return o.RunRemovePatch(fSys)
|
||||
},
|
||||
}
|
||||
@@ -53,11 +49,6 @@ func (o *removePatchOptions) Validate(args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Complete completes removePatch command.
|
||||
func (o *removePatchOptions) Complete(cmd *cobra.Command, args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// RunRemovePatch runs removePatch command (do real work).
|
||||
func (o *removePatchOptions) RunRemovePatch(fSys filesys.FileSystem) error {
|
||||
patches, err := util.GlobPatterns(fSys, o.patchFilePaths)
|
||||
|
||||
@@ -35,10 +35,6 @@ func newCmdRemoveResource(fSys filesys.FileSystem) *cobra.Command {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = o.Complete(cmd, args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return o.RunRemoveResource(fSys)
|
||||
},
|
||||
}
|
||||
@@ -54,11 +50,6 @@ func (o *removeResourceOptions) Validate(args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Complete completes removeResource command.
|
||||
func (o *removeResourceOptions) Complete(cmd *cobra.Command, args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// RunRemoveResource runs Resource command (do real work).
|
||||
func (o *removeResourceOptions) RunRemoveResource(fSys filesys.FileSystem) error {
|
||||
|
||||
|
||||
@@ -33,10 +33,6 @@ and overwrite the value with "acme-" if the field does exist.
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = o.Complete(cmd, args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return o.RunSetNamePrefix(fSys)
|
||||
},
|
||||
}
|
||||
@@ -53,11 +49,6 @@ func (o *setNamePrefixOptions) Validate(args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Complete completes setNamePrefix command.
|
||||
func (o *setNamePrefixOptions) Complete(cmd *cobra.Command, args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// RunSetNamePrefix runs setNamePrefix command (does real work).
|
||||
func (o *setNamePrefixOptions) RunSetNamePrefix(fSys filesys.FileSystem) error {
|
||||
mf, err := kustfile.NewKustomizationFile(fSys)
|
||||
|
||||
@@ -33,10 +33,6 @@ and overwrite the value with "-acme" if the field does exist.
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = o.Complete(cmd, args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return o.RunSetNameSuffix(fSys)
|
||||
},
|
||||
}
|
||||
@@ -53,11 +49,6 @@ func (o *setNameSuffixOptions) Validate(args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Complete completes setNameSuffix command.
|
||||
func (o *setNameSuffixOptions) Complete(cmd *cobra.Command, args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// RunSetNameSuffix runs setNameSuffix command (does real work).
|
||||
func (o *setNameSuffixOptions) RunSetNameSuffix(fSys filesys.FileSystem) error {
|
||||
mf, err := kustfile.NewKustomizationFile(fSys)
|
||||
|
||||
@@ -21,9 +21,9 @@ func NewCmdVersion(w io.Writer) *cobra.Command {
|
||||
Example: `kustomize version`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if short {
|
||||
fmt.Println(provenance.GetProvenance().Short())
|
||||
fmt.Fprintln(w, provenance.GetProvenance().Short())
|
||||
} else {
|
||||
fmt.Println(provenance.GetProvenance().Full())
|
||||
fmt.Fprintln(w, provenance.GetProvenance().Full())
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user