Skip to content

Commit

Permalink
Added some extra information for parsing flags to the README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnblad committed Nov 24, 2020
1 parent a3c6544 commit 2a95d1d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,18 @@ You may integrate running **godog** in your **go test** command. You can run it
The following example binds **godog** flags with specified prefix `godog` in order to prevent flag collisions.

``` go
package main

import (
"flag" // godog v0.10.0 and earlier
"os"
"testing"

"github.com/cucumber/godog"
"github.com/cucumber/godog/colors"
flag "github.com/spf13/pflag" // godog v0.11.0-rc1 (latest)
)

var opts = godog.Options{
Output: colors.Colored(os.Stdout),
Format: "progress", // can define default values
Expand Down

0 comments on commit 2a95d1d

Please sign in to comment.