Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dearchap committed Nov 1, 2024
1 parent 438695e commit 2c876d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/v3/examples/flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,9 @@ getting data from a yaml file below.

```go
// --- >8 ---
command.Before = altsrc.InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))
command.Before = func(ctx context.Context, cmd *Command) (context.Context, error) {
return ctx, altsrc.InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))
}
```

The code above will use the "load" string as a flag name to get the file name of
Expand Down

0 comments on commit 2c876d2

Please sign in to comment.