Skip to content

Conversation

@dvush
Copy link
Contributor

@dvush dvush commented Jan 7, 2026

before:

./builder-playground debug probe

goroutine 1 [running]:
main.init.func2(0xc00005f900?, {0x311fe20?, 0x4?, 0x174b889?})
	/home/dvush/flashbots/code/builder-playground/main.go:145 +0x105
github.com/spf13/cobra.(*Command).execute(0x2667c20, {0x311fe20, 0x0, 0x0})
	/home/dvush/.local/share/go/pkg/mod/github.com/spf13/[email protected]/command.go:1015 +0xb02
github.com/spf13/cobra.(*Command).ExecuteC(0x2666e60)
	/home/dvush/.local/share/go/pkg/mod/github.com/spf13/[email protected]/command.go:1148 +0x465
github.com/spf13/cobra.(*Command).Execute(...)
	/home/dvush/.local/share/go/pkg/mod/github.com/spf13/[email protected]/command.go:1071
main.main()
	/home/dvush/flashbots/code/builder-playground/main.go:320 +0xa49

after:

Error: accepts 1 arg(s), received 0
Usage:
  playground debug probe <service> [flags]

Flags:
  -h, --help   help for probe

accepts 1 arg(s), received 0

Copilot AI review requested due to automatic review settings January 7, 2026 14:09
@ferranbt ferranbt added the 🐛 bug Something isn't working label Jan 7, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a panic that occurred when running the debug probe command without the required argument. The fix adds proper argument validation and usage documentation.

  • Adds cobra.ExactArgs(1) validation to prevent the panic when no arguments are provided
  • Adds descriptive Use, Short, and Long fields to improve command documentation
  • Sets cmd.SilenceUsage = true to suppress usage output for internal errors (not validation errors)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ferranbt ferranbt merged commit d92b0c3 into main Jan 7, 2026
15 checks passed
@ferranbt ferranbt deleted the fix_debug_probe branch January 7, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants