diff options
| author | Alex Flint <[email protected]> | 2019-10-21 23:13:41 -0700 |
|---|---|---|
| committer | Alex Flint <[email protected]> | 2019-10-21 23:13:41 -0700 |
| commit | 7ac060af1863205e7dfcc103b90711767e45e2a8 (patch) | |
| tree | b069ddd515ae769f7c99eeaf087f94cb634ed110 /example_test.go | |
| parent | 809e9060d082454ac2ece1960fa2c584ba01816d (diff) | |
update documentation to new way of specifying defaults
Diffstat (limited to 'example_test.go')
| -rw-r--r-- | example_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/example_test.go b/example_test.go index 2188253..f71fbeb 100644 --- a/example_test.go +++ b/example_test.go @@ -30,12 +30,11 @@ func Example_defaultValues() { os.Args = split("./example") var args struct { - Foo string + Foo string `default:"abc"` } - args.Foo = "default value" MustParse(&args) fmt.Println(args.Foo) - // output: default value + // output: abc } // This example demonstrates arguments that are required |
