Skip to content

Commit

Permalink
fix: fix linter issues from #13
Browse files Browse the repository at this point in the history
  • Loading branch information
SLedunois committed Mar 7, 2022
1 parent b3b5b7a commit ade808b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions pkg/cmd/instances/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/spf13/cobra"
)

// AddCmd struct represents Add command object
type AddCmd struct {
Command *cobra.Command
Flags *AddFlags
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/instances/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func NewListFlags() *ListFlags {
}
}

// Apply apply ListFlags to provided command
// ApplyFlags apply ListFlags to provided command
func (cmd *ListCmd) ApplyFlags() {
cmd.Command.Flags().BoolVarP(&cmd.Flags.CSV, "csv", "c", cmd.Flags.CSV, "csv output")
cmd.Command.Flags().BoolVarP(&cmd.Flags.JSON, "json", "j", cmd.Flags.JSON, "json output")
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/instances/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/spf13/cobra"
)

// ListCmd struct represents the list command object
type ListCmd struct {
Command *cobra.Command
Flags *ListFlags
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/root/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"github.com/spf13/viper"
)

// RootFlags contains all root command flags
type RootFlags struct {
// Flags contains all root command flags
type Flags struct {
ConfigPath string
}

// NewRootFlags initialize root command flags. It returns a RootFlags struct
func NewRootFlags() *RootFlags {
return &RootFlags{}
func NewRootFlags() *Flags {
return &Flags{}
}

// ApplyFlags apply RootFlags to provided command
Expand Down
3 changes: 2 additions & 1 deletion pkg/cmd/root/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import (
"github.com/spf13/viper"
)

// RootCmd struct represents the root command object
type RootCmd struct {
Command *cobra.Command
Flags *RootFlags
Flags *Flags
}

// NewCmd initialize the root command
Expand Down

0 comments on commit ade808b

Please sign in to comment.