Skip to content

Commit 056c86f

Browse files
committed
docs: fix altsrc example
1 parent 7d0e69e commit 056c86f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/migrate-v2-to-v3.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,11 @@ Shell command to find them all: `fgrep -rl github.com/urfave/cli/v2 *`
108108

109109
=== "v3"
110110

111+
Requires to use at least `github.com/urfave/cli-altsrc/[email protected]`
112+
111113
```go
112114
cli.StringFlag{
113-
Sources: altsrc.JSON("key", "/tmp/foo")
115+
Sources: cli.NewValueSourceChain(altsrcjson.JSON("key", altsrc.StringSourcer("/path/to/foo.json"))),
114116
}
115117
```
116118

0 commit comments

Comments
 (0)