From 22a08a545d266be5f631885ea60458cee3540f8a Mon Sep 17 00:00:00 2001 From: Andrew Wilkins Date: Mon, 10 Feb 2020 09:31:52 +0800 Subject: [PATCH] Rename examples to _examples Rename the examples so that their dependencies don't leak into the main module. --- Makefile | 2 +- README.md | 10 +++++----- {examples => _examples}/api/README.md | 0 {examples => _examples}/api/api.go | 0 {examples => _examples}/api/api_test.go | 0 .../api/features/version.feature | 0 {examples => _examples}/api/screenshots/passed.png | Bin .../api/screenshots/undefined.png | Bin {examples => _examples}/db/Makefile | 0 {examples => _examples}/db/README.md | 0 {examples => _examples}/db/api.go | 0 {examples => _examples}/db/api_test.go | 0 {examples => _examples}/db/features/users.feature | 0 {examples => _examples}/doc.go | 0 .../godogs/features/godogs.feature | 0 {examples => _examples}/godogs/godogs.go | 0 {examples => _examples}/godogs/godogs_test.go | 0 go.mod | 6 ------ go.sum | 6 ------ 19 files changed, 6 insertions(+), 18 deletions(-) rename {examples => _examples}/api/README.md (100%) rename {examples => _examples}/api/api.go (100%) rename {examples => _examples}/api/api_test.go (100%) rename {examples => _examples}/api/features/version.feature (100%) rename {examples => _examples}/api/screenshots/passed.png (100%) rename {examples => _examples}/api/screenshots/undefined.png (100%) rename {examples => _examples}/db/Makefile (100%) rename {examples => _examples}/db/README.md (100%) rename {examples => _examples}/db/api.go (100%) rename {examples => _examples}/db/api_test.go (100%) rename {examples => _examples}/db/features/users.feature (100%) rename {examples => _examples}/doc.go (100%) rename {examples => _examples}/godogs/features/godogs.feature (100%) rename {examples => _examples}/godogs/godogs.go (100%) rename {examples => _examples}/godogs/godogs_test.go (100%) diff --git a/Makefile b/Makefile index 1d19223..d3fb0fb 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ bump: @if [ -z "$(VERSION)" ]; then echo "Provide version like: 'VERSION=$(VERS) make bump'"; exit 1; fi @echo "bumping version from: $(VERS) to $(VERSION)" @sed -i.bak 's/$(VERS)/$(VERSION)/g' godog.go - @sed -i.bak 's/$(VERS)/$(VERSION)/g' examples/api/features/version.feature + @sed -i.bak 's/$(VERS)/$(VERSION)/g' _examples/api/features/version.feature @find . -name '*.bak' | xargs rm cover: diff --git a/README.md b/README.md index ebb097b..0e8729f 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ themselves from costly regressions. ## Example The following example can be [found -here](/examples/godogs). +here](/_examples/godogs). ### Step 1 @@ -213,7 +213,7 @@ composed. image](https://github.com/myie/cucumber-html-reporter) for usage details. - [how to use godog by semaphoreci](https://semaphoreci.com/community/tutorials/how-to-use-godog-for-behavior-driven-development-in-go) -- see [examples](https://github.com/cucumber/godog/tree/master/examples) +- see [examples](https://github.com/cucumber/godog/tree/master/_examples) - see extension [AssistDog](https://github.com/hellomd/assistdog), which may have useful **gherkin.DataTable** transformations or comparison methods for assertions. @@ -226,9 +226,9 @@ See `godog -h` for general command options. See implementation examples: -- [rest API server](/examples/api) -- [rest API with Database](/examples/db) -- [godogs](/examples/godogs) +- [rest API server](/_examples/api) +- [rest API with Database](/_examples/db) +- [godogs](/_examples/godogs) ## FAQ diff --git a/examples/api/README.md b/_examples/api/README.md similarity index 100% rename from examples/api/README.md rename to _examples/api/README.md diff --git a/examples/api/api.go b/_examples/api/api.go similarity index 100% rename from examples/api/api.go rename to _examples/api/api.go diff --git a/examples/api/api_test.go b/_examples/api/api_test.go similarity index 100% rename from examples/api/api_test.go rename to _examples/api/api_test.go diff --git a/examples/api/features/version.feature b/_examples/api/features/version.feature similarity index 100% rename from examples/api/features/version.feature rename to _examples/api/features/version.feature diff --git a/examples/api/screenshots/passed.png b/_examples/api/screenshots/passed.png similarity index 100% rename from examples/api/screenshots/passed.png rename to _examples/api/screenshots/passed.png diff --git a/examples/api/screenshots/undefined.png b/_examples/api/screenshots/undefined.png similarity index 100% rename from examples/api/screenshots/undefined.png rename to _examples/api/screenshots/undefined.png diff --git a/examples/db/Makefile b/_examples/db/Makefile similarity index 100% rename from examples/db/Makefile rename to _examples/db/Makefile diff --git a/examples/db/README.md b/_examples/db/README.md similarity index 100% rename from examples/db/README.md rename to _examples/db/README.md diff --git a/examples/db/api.go b/_examples/db/api.go similarity index 100% rename from examples/db/api.go rename to _examples/db/api.go diff --git a/examples/db/api_test.go b/_examples/db/api_test.go similarity index 100% rename from examples/db/api_test.go rename to _examples/db/api_test.go diff --git a/examples/db/features/users.feature b/_examples/db/features/users.feature similarity index 100% rename from examples/db/features/users.feature rename to _examples/db/features/users.feature diff --git a/examples/doc.go b/_examples/doc.go similarity index 100% rename from examples/doc.go rename to _examples/doc.go diff --git a/examples/godogs/features/godogs.feature b/_examples/godogs/features/godogs.feature similarity index 100% rename from examples/godogs/features/godogs.feature rename to _examples/godogs/features/godogs.feature diff --git a/examples/godogs/godogs.go b/_examples/godogs/godogs.go similarity index 100% rename from examples/godogs/godogs.go rename to _examples/godogs/godogs.go diff --git a/examples/godogs/godogs_test.go b/_examples/godogs/godogs_test.go similarity index 100% rename from examples/godogs/godogs_test.go rename to _examples/godogs/godogs_test.go diff --git a/go.mod b/go.mod index 037ca4a..198afd0 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,3 @@ module github.com/cucumber/godog go 1.13 - -require ( - github.com/DATA-DOG/go-txdb v0.1.3 - github.com/go-sql-driver/mysql v1.5.0 - github.com/lib/pq v1.3.0 // indirect -) diff --git a/go.sum b/go.sum index 9c8ca19..e69de29 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +0,0 @@ -github.com/DATA-DOG/go-txdb v0.1.3 h1:R4v6OuOcy2O147e2zHxU0B4NDtF+INb5R9q/CV7AEMg= -github.com/DATA-DOG/go-txdb v0.1.3/go.mod h1:DhAhxMXZpUJVGnT+p9IbzJoRKvlArO2pkHjnGX7o0n0= -github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= -github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=