8000 Check for ignored flags · Issue #57 · boldsoftware/sketch · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Check for ignored flags #57

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
maruel opened this issue May 4, 2025 · 1 comment
Open

Check for ignored flags #57

maruel opened this issue May 4, 2025 · 1 comment

Comments

@maruel
Copy link
Contributor
maruel commented May 4, 2025

When creating a tool that uses flag, check for

if flag.NArg() != 0 {
  <error>
}

instead of silently ignoring. Silent ignore of arguments is a common error for Go programmers.

@josharian
Copy link
Contributor

Good point. I've been doing this wrong my whole life. Thanks for pointing it out. :)

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

No branches or pull requests

2 participants
0