Skip to content

Commit 4700ea1

Browse files
authored
Merge pull request urfave#37 from urfave/similar-projects
Add https://github.com/jessevdk/go-flags to the project list
2 parents 5e90e50 + 7dd8905 commit 4700ea1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ func main() {
133133
```
134134

135135
That code generates next output:
136-
```
137-
go run ./main.go --help
136+
```sh
137+
$ go run ./main.go --help
138138
Usage of _obj/exe/main:
139139
-http-host value
140140
HTTP host (default 127.0.0.1)
@@ -151,7 +151,7 @@ exit status 2
151151

152152
The flag default key string is the struct field name but can be specified in the struct field's tag value.
153153
The "flag" key in the struct field's tag value is the key name, followed by an optional comma and options. Examples:
154-
```
154+
```golang
155155
// Field is ignored by this package.
156156
Field int `flag:"-"`
157157

@@ -175,9 +175,9 @@ Field int `flag:",deprecated"`
175175
## Options for desc tag
176176
If you specify description in description tag (`desc` by default) it will be used in USAGE section.
177177

178-
```
178+
```golang
179179
Addr string `desc:"HTTP host"`
180-
```
180+
```sh
181181
this description produces something like:
182182
```
183183
-addr value
@@ -189,7 +189,7 @@ this description produces something like:
189189

190190
## Options for Parse function:
191191

192-
```
192+
```golang
193193
// DescTag sets custom description tag. It is "desc" by default.
194194
func DescTag(val string)
195195

@@ -226,3 +226,4 @@ func Flatten(val bool)
226226

227227
* https://github.com/jaffee/commandeer
228228
* https://github.com/anacrolix/tagflag
229+
* https://github.com/jessevdk/go-flags

0 commit comments

Comments
 (0)