Skip to content

Commit

Permalink
Replace use of cmdutil IsFilenameSliceEmpty
Browse files Browse the repository at this point in the history
The function was trivial, and it is changed in a later k8s version.
  • Loading branch information
justinsb committed Jul 19, 2019
1 parent b2c9be8 commit 2864820
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/kops/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func NewCmdCreate(f *util.Factory, out io.Writer) *cobra.Command {
Long: createLong,
Example: createExample,
Run: func(cmd *cobra.Command, args []string) {
if cmdutil.IsFilenameSliceEmpty(options.Filenames) {
if len(options.Filenames) == 0 {
cmd.Help()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/kops/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func NewCmdDelete(f *util.Factory, out io.Writer) *cobra.Command {
Example: deleteExample,
SuggestFor: []string{"rm"},
Run: func(cmd *cobra.Command, args []string) {
if cmdutil.IsFilenameSliceEmpty(options.Filenames) {
if len(options.Filenames) == 0 {
cmd.Help()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/kops/replace.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func NewCmdReplace(f *util.Factory, out io.Writer) *cobra.Command {
Long: replaceLong,
Example: replaceExample,
Run: func(cmd *cobra.Command, args []string) {
if cmdutil.IsFilenameSliceEmpty(options.Filenames) {
if len(options.Filenames) == 0 {
cmd.Help()
return
}
Expand Down

0 comments on commit 2864820

Please sign in to comment.