Skip to content

Commit

Permalink
Fix example demonstrating usage of env vars (#95)
Browse files Browse the repository at this point in the history
It seems `WithEnvVars` does not exist in version 3, but instead `WithEnvVarNoPrefix` is now doing what is described in the example.
  • Loading branch information
m90 authored May 26, 2022
1 parent 7c05c99 commit 587b583
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func main() {
port = fs.Int("port", 8080, "listen port for server (also via PORT)")
debug = fs.Bool("debug", false, "log debug information (also via DEBUG)")
)
if err := ff.Parse(fs, os.Args[1:], ff.WithEnvVars()); err != nil {
if err := ff.Parse(fs, os.Args[1:], ff.WithEnvVarNoPrefix()); err != nil {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
os.Exit(1)
}
Expand Down

0 comments on commit 587b583

Please sign in to comment.