Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opencoff/go-options
golang self-documenting command line option parsing from a text-block
https://github.com/opencoff/go-options
arguments-parser command-line-arguments-parser golang self-documenting
Last synced: about 1 month ago
JSON representation
golang self-documenting command line option parsing from a text-block
- Host: GitHub
- URL: https://github.com/opencoff/go-options
- Owner: opencoff
- License: mit
- Created: 2018-02-28T22:41:37.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-28T22:46:32.000Z (almost 7 years ago)
- Last Synced: 2024-06-20T05:13:18.142Z (7 months ago)
- Topics: arguments-parser, command-line-arguments-parser, golang, self-documenting
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Options - self documenting go-lang command line parsing
The list of options a program wishes to use is specified as a
lengthy, multi-line string. This string also serves as the
help-string for the options.Here is an example option specification:
Usage: example-tool
A short description of the command
--
flag --flag,-f,FLAG A description for this flag
option= --option=,-o=,OPTION= A description for this option
the description continues here
!required= --required,-r=,REQUIRED= A required option
--
env_var= ENV_VAR= An environment variable
--
help help,h Show this help message
run run Run some function
--
Additional help for options or defaults etc. go here.Read the documentation
## Notes
Forked and modified from github.com/fd/options. I've retained the
original license. Sadly, I didn't do a proper fork; so, my list of
changes list is lost.The godoc is [here](http://go.pkgdoc.org/github.com/opencoff/go-options).