diff --git a/README.md b/README.md index 94bb3cb78..68cd486f6 100644 --- a/README.md +++ b/README.md @@ -104,13 +104,21 @@ var pickles = Gherkin.compile(gherkinDocument, 'uri_of_the_feature.feature', uui ```go // Go -// Download the package via: `go get github.com/cucumber/cucumber/gherkin/go` +// Download the package via: `go get github.com/cucumber/gherkin/go/v27` +// && go get "github.com/cucumber/messages/go/v22" import ( "strings" - gherkin "github.com/cucumber/cucumber/gherkin/go" + + gherkin "github.com/cucumber/gherkin/go/v27" + messages "github.com/cucumber/messages/go/v22" ) -reader := strings.NewReader(`Feature: ...`) -gherkinDocument, err := gherkin.ParseGherkinDocument(reader) + +func main() { + uuid := &message.UUID{} // or &message.Incrementing{} + reader := strings.NewReader(`Feature: ...`) + gherkinDocument, err := gherkin.ParseGherkinDocument(reader, uuid.NewId) + pickles := gherkin.Pickles(*gherkinDocument, "minimal.feature", uuid.NewId) +} ``` ```python