akamensky / argparse

Argparse for golang. Just because `flag` sucks
MIT License
604 stars 62 forks source link

Add required args example #8

Closed drewwalters96 closed 6 years ago

drewwalters96 commented 6 years ago

A simple example I made using string arguments to demonstrate required args while getting started with this project.

I also included some documentation to go along with it (similar to the Python explanation of the argparse module) in case updating large examples becomes cumbersome in the future when changes to the code base occur, or you decided to move to something like Read the Docs.

akamensky commented 6 years ago

@drewwalters96 Thanks for your contribution, this is very needed example indeed. Just a couple of small requests:

PS: Please also if you do these changes, make sure to squash your commits into a single one. Thanks!

drewwalters96 commented 6 years ago

@akamensky glad I could help out.

can you please update examples/README.md (append name and brief description of your example)

Done.

and perhaps would be good idea to rename examples/required-args/required-args.md to examples/required-args/README.md (so that Github would render the file at the bottom of the page)?

Done.

Please also if you do these changes, make sure to squash your commits into a single one. Thanks!

Always!

akamensky commented 6 years ago

@drewwalters96 Merged, thanks again for you contribution ;)