Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rtpt-erikgeiser committed Apr 26, 2024
1 parent ab41e5d commit 5b59894
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion cmd/fuzz/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ You can also start ranges from the end:
--hide-status 500 https://example.com/login/session
You can also specify the format of the range values using printf-style format
strings (in the following the values are preceeded with zeroes):
strings (in the following the values are preceded with zeroes):
monsoon fuzz --range 10000-1 \
--range-format '%010d' \
Expand Down
38 changes: 20 additions & 18 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,26 @@ var cmdVersion = &cobra.Command{
}

var completionCmd = &cobra.Command{
Use: "completion [bash|zsh|fish|powershell]",
Short: "Generate completion script",
Long: "To load completions",
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Args: cobra.ExactValidArgs(1),
Run: func(cmd *cobra.Command, args []string) {
switch args[0] {
case "bash":
cmdRoot.GenBashCompletionV2(os.Stdout, true)
case "zsh":
cmdRoot.GenZshCompletion(os.Stdout)
case "fish":
cmdRoot.GenFishCompletion(os.Stdout, true)
case "powershell":
cmdRoot.GenPowerShellCompletionWithDesc(os.Stdout)
}
},
Use: "completion [bash|zsh|fish|powershell]",
Short: "Generate completion script",
Long: "To load completions",
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
RunE: func(cmd *cobra.Command, args []string) error {
switch args[0] {
case "bash":
return cmdRoot.GenBashCompletionV2(os.Stdout, true)
case "zsh":
return cmdRoot.GenZshCompletion(os.Stdout)
case "fish":
return cmdRoot.GenFishCompletion(os.Stdout, true)
case "powershell":
return cmdRoot.GenPowerShellCompletionWithDesc(os.Stdout)
default:
return fmt.Errorf("unsupported argument: %q", args[0])
}
},
}

func init() {
Expand Down

0 comments on commit 5b59894

Please sign in to comment.