Skip to content

Don't panic on missing command #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tkjaer
Copy link

@tkjaer tkjaer commented Jun 16, 2025

This PR adds a check for missing command and returns help instead of exiting with a panic.

Prevents:

panic: runtime error: index out of range [0] with length 0

goroutine 27 [running]:
github.com/haproxytech/dataplaneapi/runtime.serve(0xc00033e0c8, {0x1edc2e0, 0xc00578e100})
	github.com/haproxytech/dataplaneapi/runtime/serve.go:38 +0x5a5
created by github.com/haproxytech/dataplaneapi/runtime.(*DebugServer).Start.func2 in goroutine 74
	github.com/haproxytech/dataplaneapi/runtime/runtime.go:102 +0x4e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant