Skip to content

Commit 2b012e9

Browse files
committed
Fix lint issue.
1 parent 4cf6272 commit 2b012e9

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

cmd/common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ var defaultCloud = common.Cloud{
2929
}
3030

3131
// SetFlags sets base option flags on the provided flagset.
32-
func (o *BaseOptions) SetFlags(f *pflag.FlagSet, cmd *cobra.Command) {
32+
func (o *BaseOptions) SetFlags(f *pflag.FlagSet) {
3333
f.StringVar(&o.Provider, "cloud", "", "cloud provider")
3434
f.StringVar(&o.Log, "log", "info", "log level")
3535
f.StringVar(&o.Region, "region", "us-east", "cloud region")
36-
cmd.MarkFlagRequired("cloud")
36+
cobra.CheckErr(cobra.MarkFlagRequired(f, "cloud"))
3737
}
3838

3939
// GetCloud parses cloud-specific options and returns a cloud structure.

cmd/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func newCreateCmd() *cobra.Command {
4646
RunE: o.Run,
4747
}
4848

49-
o.BaseOptions.SetFlags(cmd.Flags(), cmd)
49+
o.BaseOptions.SetFlags(cmd.Flags())
5050

5151
cmd.Flags().StringToStringVar(&o.Environment, "environment", map[string]string{}, "environment variables")
5252
cmd.Flags().StringVar(&o.Image, "image", "ubuntu", "machine image")

cmd/destroy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func newDestroyCmd() *cobra.Command {
3030
RunE: o.Run,
3131
}
3232

33-
o.BaseOptions.SetFlags(cmd.Flags(), cmd)
33+
o.BaseOptions.SetFlags(cmd.Flags())
3434

3535
cmd.Flags().StringVar(&o.Output, "output", "", "output directory, relative to workdir")
3636
cmd.Flags().StringVar(&o.Workdir, "workdir", ".", "working directory")

cmd/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func newListCmd() *cobra.Command {
2727
RunE: o.Run,
2828
}
2929

30-
o.BaseOptions.SetFlags(cmd.Flags(), cmd)
30+
o.BaseOptions.SetFlags(cmd.Flags())
3131

3232
return cmd
3333
}

cmd/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func newStatusCmd() *cobra.Command {
3636
RunE: o.Run,
3737
}
3838

39-
o.BaseOptions.SetFlags(cmd.Flags(), cmd)
39+
o.BaseOptions.SetFlags(cmd.Flags())
4040

4141
cmd.Flags().IntVar(&o.Parallelism, "parallelism", 1, "parallelism")
4242

cmd/stop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func newStopCmd() *cobra.Command {
2828
},
2929
RunE: o.Run,
3030
}
31-
o.BaseOptions.SetFlags(cmd.Flags(), cmd)
31+
o.BaseOptions.SetFlags(cmd.Flags())
3232

3333
return cmd
3434
}

0 commit comments

Comments
 (0)