Skip to content

Commit

Permalink
refactor: Replace unused 'args' with '_' in several commands (#834)
Browse files Browse the repository at this point in the history
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
  • Loading branch information
craciunoiuc committed Sep 21, 2023
2 parents 5aeaca3 + 9266a4c commit 02a83e3
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/kraft/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ func (opts *Build) pull(ctx context.Context, project app.Application, workdir st
return nil
}

func (opts *Build) Run(cmd *cobra.Command, args []string) error {
func (opts *Build) Run(cmd *cobra.Command, _ []string) error {
ctx := cmd.Context()

// Filter project targets by any provided CLI options
Expand Down
2 changes: 1 addition & 1 deletion cmd/kraft/fetch/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func (opts *Fetch) pull(ctx context.Context, project app.Application, workdir st
return nil
}

func (opts *Fetch) Run(cmd *cobra.Command, args []string) error {
func (opts *Fetch) Run(cmd *cobra.Command, _ []string) error {
ctx := cmd.Context()

// Filter project targets by any provided CLI options
Expand Down
2 changes: 1 addition & 1 deletion cmd/kraft/menu/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func (opts *Menu) pull(ctx context.Context, project app.Application, workdir str
return nil
}

func (opts *Menu) Run(cmd *cobra.Command, args []string) error {
func (opts *Menu) Run(cmd *cobra.Command, _ []string) error {
ctx := cmd.Context()

// Filter project targets by any provided CLI options
Expand Down
2 changes: 1 addition & 1 deletion cmd/kraft/net/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (opts *List) Pre(cmd *cobra.Command, _ []string) error {
return nil
}

func (opts *List) Run(cmd *cobra.Command, args []string) error {
func (opts *List) Run(cmd *cobra.Command, _ []string) error {
var err error

ctx := cmd.Context()
Expand Down
2 changes: 1 addition & 1 deletion cmd/kraft/net/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ func (opts *Net) Pre(cmd *cobra.Command, _ []string) error {
return nil
}

func (opts *Net) Run(cmd *cobra.Command, args []string) error {
func (opts *Net) Run(cmd *cobra.Command, _ []string) error {
return cmd.Help()
}
2 changes: 1 addition & 1 deletion cmd/kraft/ps/ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (opts *Ps) Pre(cmd *cobra.Command, _ []string) error {
return nil
}

func (opts *Ps) Run(cmd *cobra.Command, args []string) error {
func (opts *Ps) Run(cmd *cobra.Command, _ []string) error {
var err error

type psTable struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/kraft/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func New() *cobra.Command {
return cmd
}

func (opts *Version) Run(cmd *cobra.Command, args []string) error {
func (opts *Version) Run(cmd *cobra.Command, _ []string) error {
fmt.Fprintf(iostreams.G(cmd.Context()).Out, "kraft %s", version.String())
return nil
}

0 comments on commit 02a83e3

Please sign in to comment.