-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
change from os.Args scan to flags #301
Comments
Not a bug, but not a feature either. |
Hi @CommoDor64 , thanks for creating this issue! If you have any questions, please let me know! |
Sounds great. |
Great, I assigned you to this issue as well. |
@CommoDor64 thanks for your commitment! The reason we switched to reading the But if you can find a solution to make it compatible with other libraries who also use |
I suspected there was a valid reason for it. |
@CommoDor64 thanks for your feedback, I do agree that using the default functions is the best practice. We might come back to this in the future 👍 |
Current state
Command line flags are being scanned explicitly, this reduces readability, can introduce bugs and make future changes more difficult
Proposal
Delegating this responsibility to https://golang.org/pkg/flag/, as it is 1st party, idiomatic and very easy to use with little chances to introduce any issues.
It will also allow to delegate all flag parsing to a dedicate file or package
Example
app.go
turns to
The text was updated successfully, but these errors were encountered: