Skip to content

Commit

Permalink
add docs about old way of specifying defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
alexflint committed Oct 22, 2019
1 parent 7ac060a commit e0fc08f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,17 @@ var args struct {
arg.MustParse(&args)
```
### Default values (before v1.2)
```go
var args struct {
Foo string
Bar bool
}
arg.Foo = "abc"
arg.MustParse(&args)
```
### Arguments with multiple values
```go
var args struct {
Expand Down

0 comments on commit e0fc08f

Please sign in to comment.