Skip to content

Commit

Permalink
Merge pull request #37 from urfave/similar-projects
Browse files Browse the repository at this point in the history
Add https://github.com/jessevdk/go-flags to the project list
  • Loading branch information
abitrolly authored Nov 12, 2024
2 parents 5e90e50 + 7dd8905 commit 4700ea1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ func main() {
```

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

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

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

```
```golang
Addr string `desc:"HTTP host"`
```
```sh
this description produces something like:
```
-addr value
Expand All @@ -189,7 +189,7 @@ this description produces something like:

## Options for Parse function:

```
```golang
// DescTag sets custom description tag. It is "desc" by default.
func DescTag(val string)

Expand Down Expand Up @@ -226,3 +226,4 @@ func Flatten(val bool)

* https://github.com/jaffee/commandeer
* https://github.com/anacrolix/tagflag
* https://github.com/jessevdk/go-flags

0 comments on commit 4700ea1

Please sign in to comment.