Skip to content
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

Replace panic("not reachable") with panic(NewUnreachableError()) #512

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

turbolent
Copy link
Member

@turbolent turbolent commented Feb 14, 2025

Description

Unimportant, tiny improvements:

  • Replace every panic("not reachable") with panic(UnreachableError())

  • In a smoke test, improve error when flag cannot be parsed by replacing:

    panic("Failed to parse seed flag (hex string)")`

    with

    fmt.Fprintf(os.Stderr, "failed to parse seed flag (hex string) %s: %s", flagSeedHex, err) 

  • Targeted PR against main branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@turbolent turbolent requested a review from fxamacker as a code owner February 14, 2025 21:40
Copy link
Member

@fxamacker fxamacker left a comment

Choose a reason for hiding this comment

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

Nice! 👍

@turbolent turbolent merged commit 3909909 into main Feb 14, 2025
8 checks passed
@turbolent turbolent deleted the bastian/cleanup branch February 14, 2025 22:47
@fxamacker fxamacker changed the title Some minor improvements Replace panic("not reachable") with panic(NewUnreachableError()) Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants