summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAndrew Morozko <[email protected]>2020-12-20 03:07:18 +0300
committerAndrew Morozko <[email protected]>2020-12-20 03:07:18 +0300
commit04c3fdbd8019af78797e714ac5070d7056e71f57 (patch)
tree7c0a2773a3a61e2ff480b20f6e8fe9ee26bff0c8 /README.md
parentfaebd3e0f24333a5777102db081a844fdaf7b07b (diff)
Updated readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 6 insertions, 4 deletions
diff --git a/README.md b/README.md
index a9555b9..da69469 100644
--- a/README.md
+++ b/README.md
@@ -244,21 +244,23 @@ someprogram 4.3.0
```go
var args struct {
- Short string `arg:"-s"`
- Long string `arg:"--custom-long-option"`
- ShortAndLong string `arg:"-x,--my-option"`
+ Short string `arg:"-s"`
+ Long string `arg:"--custom-long-option"`
+ ShortAndLong string `arg:"-x,--my-option"`
+ OnlyShort string `arg:"-o,--"`
}
arg.MustParse(&args)
```
```shell
$ ./example --help
-Usage: [--short SHORT] [--custom-long-option CUSTOM-LONG-OPTION] [--my-option MY-OPTION]
+Usage: example [-o ONLYSHORT] [--short SHORT] [--custom-long-option CUSTOM-LONG-OPTION] [--my-option MY-OPTION]
Options:
--short SHORT, -s SHORT
--custom-long-option CUSTOM-LONG-OPTION
--my-option MY-OPTION, -x MY-OPTION
+ -o ONLYSHORT
--help, -h display this help and exit
```