From 2b01d497830233e3d5ea25f5a08e13e9dd1d732f Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Sun, 23 Feb 2020 10:14:00 +0100 Subject: [PATCH] feat: move go.mod on repo root --- .circleci/config.yml | 12 +++++------ .dockerignore | 21 +++++++++++-------- go/Dockerfile => Dockerfile | 2 +- README.md | 2 +- docs/Makefile | 2 +- docs/gen.sum | 2 +- go/go.mod => go.mod | 2 +- go/go.sum => go.sum | 0 go/.dockerignore | 8 ------- go/Makefile | 14 +++++++------ go/cmd/pathwar/main.go | 16 +++++++------- go/cmd/pwinit/main.go | 4 ++-- go/doc.go | 2 +- go/gen.sum | 2 +- go/internal/randstring/randstring.go | 2 +- go/internal/testutil/doc.go | 2 +- go/pkg/errcode/doc.go | 2 +- go/pkg/pwagent/api.go | 4 ++-- go/pkg/pwagent/daemon.go | 4 ++-- go/pkg/pwagent/doc.go | 2 +- go/pkg/pwagent/docker.go | 10 ++++----- go/pkg/pwagent/nginx.go | 8 +++---- go/pkg/pwagent/types.go | 2 +- go/pkg/pwapi/api_agent-list-instances.go | 4 ++-- go/pkg/pwapi/api_agent-list-instances_test.go | 4 ++-- go/pkg/pwapi/api_agent-list.go | 2 +- go/pkg/pwapi/api_agent-register.go | 4 ++-- go/pkg/pwapi/api_agent-register_test.go | 4 ++-- go/pkg/pwapi/api_agent-update-state.go | 2 +- go/pkg/pwapi/api_challenge-get.go | 4 ++-- go/pkg/pwapi/api_challenge-get_test.go | 4 ++-- go/pkg/pwapi/api_challenge-list.go | 2 +- .../pwapi/api_challenge-subscription-close.go | 4 ++-- .../api_challenge-subscription-close_test.go | 6 +++--- .../api_challenge-subscription-validate.go | 4 ++-- ...pi_challenge-subscription-validate_test.go | 6 +++--- go/pkg/pwapi/api_coupon-validate.go | 4 ++-- go/pkg/pwapi/api_coupon-validate_test.go | 4 ++-- go/pkg/pwapi/api_organization-list.go | 4 ++-- go/pkg/pwapi/api_season-challenge-buy.go | 4 ++-- go/pkg/pwapi/api_season-challenge-buy_test.go | 4 ++-- go/pkg/pwapi/api_season-challenge-get.go | 4 ++-- go/pkg/pwapi/api_season-challenge-get_test.go | 4 ++-- go/pkg/pwapi/api_season-challenge-list.go | 4 ++-- .../pwapi/api_season-challenge-list_test.go | 4 ++-- go/pkg/pwapi/api_team-accept-invite.go | 2 +- go/pkg/pwapi/api_team-create.go | 4 ++-- go/pkg/pwapi/api_team-create_test.go | 6 +++--- go/pkg/pwapi/api_team-get.go | 4 ++-- go/pkg/pwapi/api_team-get_test.go | 4 ++-- go/pkg/pwapi/api_team-list.go | 4 ++-- go/pkg/pwapi/api_team-list_test.go | 4 ++-- go/pkg/pwapi/api_team-send-invite.go | 2 +- go/pkg/pwapi/api_tool-dbdump.go | 2 +- go/pkg/pwapi/api_tool-generate-fake-data.go | 2 +- go/pkg/pwapi/api_tool-info.go | 2 +- go/pkg/pwapi/api_tool-info_test.go | 2 +- go/pkg/pwapi/api_tool-status_test.go | 2 +- go/pkg/pwapi/api_user-delete-account.go | 4 ++-- go/pkg/pwapi/api_user-delete-account_test.go | 2 +- go/pkg/pwapi/api_user-get-session.go | 6 +++--- go/pkg/pwapi/api_user-get-session_test.go | 4 ++-- go/pkg/pwapi/api_user-set-preferences.go | 4 ++-- go/pkg/pwapi/api_user-set-preferences_test.go | 4 ++-- go/pkg/pwapi/auth.go | 6 +++--- go/pkg/pwapi/doc.go | 2 +- go/pkg/pwapi/helpers.go | 2 +- go/pkg/pwapi/pwapi.pb.go | 4 ++-- go/pkg/pwapi/server.go | 2 +- go/pkg/pwapi/server_test.go | 2 +- go/pkg/pwapi/service.go | 4 ++-- go/pkg/pwapi/testing.go | 4 ++-- go/pkg/pwapi/testing_test.go | 6 +++--- go/pkg/pwcompose/compose.go | 6 +++--- go/pkg/pwcompose/doc.go | 2 +- go/pkg/pwdb/db.go | 2 +- go/pkg/pwdb/doc.go | 2 +- go/pkg/pwdb/errors.go | 2 +- go/pkg/pwdb/helpers.go | 2 +- go/pkg/pwdb/migrations.go | 2 +- go/pkg/pwinit/doc.go | 2 +- go/pkg/pwsso/client.go | 2 +- go/pkg/pwsso/doc.go | 2 +- go/pkg/pwsso/keycloak.go | 2 +- go/pkg/pwsso/token.go | 2 +- go/pkg/pwversion/doc.go | 2 +- rules.mk | 18 +++++++++------- tool/integration/docker-compose.override.yml | 2 +- 88 files changed, 179 insertions(+), 178 deletions(-) rename go/Dockerfile => Dockerfile (93%) rename go/go.mod => go.mod (98%) rename go/go.sum => go.sum (100%) delete mode 100644 go/.dockerignore diff --git a/.circleci/config.yml b/.circleci/config.yml index cfc233dd0..125677e65 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: # image: pathwar/pathwar go-build: - working_directory: /go/src/pathwar.land/go + working_directory: /go/src/pathwar.land docker: - image: circleci/golang:1.13 steps: @@ -28,13 +28,13 @@ jobs: path: /go/src/pathwar.land - moul/mod-download - gotools/mod-tidy-check - - run: make install - - run: SKIP_SLOW_TESTS=1 make unittest GO_TEST_OPTS="-test.timeout=60s -count=10" - - run: SKIP_SLOW_TESTS=0 make unittest GO_TEST_OPTS="-test.timeout=60s -count=2" + - run: cd go && make install + - run: cd go && SKIP_SLOW_TESTS=1 make unittest GO_TEST_OPTS="-test.timeout=60s -count=10" + - run: cd go && SKIP_SLOW_TESTS=0 make unittest GO_TEST_OPTS="-test.timeout=60s -count=2" - moul/install_golangci-lint - - run: PATH=$PATH:$(pwd)/bin make lint + - run: cd go && PATH=$PATH:$(pwd)/bin make lint - codecov/upload: - file: coverage.txt + file: go/coverage.txt go-generate: working_directory: /go/src/pathwar.land diff --git a/.dockerignore b/.dockerignore index 6824de690..8ab3e252a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,13 +1,16 @@ +.*~ +.#* +*~ +*# +.circleci/ +coverage.txt +docker-compose.yml +Dockerfile +.dockerignore +.gitignore node_modules +out/ package-lock.json -yarn.lock -.circleci/ test/ -*~ -.#* -.*~ -Dockerfile vendor/ -.gitignore -.dockerignore -docker-compose.yml +yarn.lock diff --git a/go/Dockerfile b/Dockerfile similarity index 93% rename from go/Dockerfile rename to Dockerfile index e78491977..7bcbe8287 100644 --- a/go/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.13-alpine as builder RUN apk --no-cache --update add nodejs-npm make gcc g++ musl-dev openssl-dev git ENV GO111MODULE=on GOPROXY=https://proxy.golang.org,direct -COPY go.mod go.sum /go/src/pathwar.land/go/ +COPY go.mod go.sum /go/src/pathwar.land/ WORKDIR /go/src/pathwar.land/go RUN go mod download COPY . . diff --git a/README.md b/README.md index 4c5613219..49364a5ba 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Code Factor Go Report Card GitHub version - GoDoc + GoDoc

diff --git a/docs/Makefile b/docs/Makefile index 08780ab52..aa5c4388b 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -24,7 +24,7 @@ gen.sum: $(GEN_SRC) .PHONY: generate_local generate_local: - protoc -I ../go/vendor/github.com/grpc-ecosystem/grpc-gateway:../api:../go/vendor:/protobuf --swagger_out=logtostderr=true:. ../api/pwapi.proto + protoc -I ../vendor/github.com/grpc-ecosystem/grpc-gateway:../api:../vendor:/protobuf --swagger_out=logtostderr=true:. ../api/pwapi.proto echo 'swagger: "2.0"' > swagger.yaml.tmp cat ./pwapi.swagger.json | json2yaml | grep -v 'swagger: "2.0"' >> swagger.yaml.tmp rm -f ./pwapi.swagger.json diff --git a/docs/gen.sum b/docs/gen.sum index b234f7405..889340399 100644 --- a/docs/gen.sum +++ b/docs/gen.sum @@ -1,8 +1,8 @@ 4362a2715e8c2053c4bec93585b01ca252dae2e7 ../api/pwagent.proto 70d67f1cebb3b7f9e86fd0197d43db4c1f795f65 ../api/pwinit.proto a45fa08c595709dd752f52ded4493ceb3a191de2 ../api/pwcompose.proto +b030488b89ccf7f81f418541eae8c2f293918f1a Makefile b1d0de9f391f901a4a785a35abca59bac7c52872 ../api/errcode.proto b7830ceacc4030e7987231426c45753f67285fda ../api/pwapi.proto bad04556b7233d5c8ddbcc1a3b2bfd027b694bce ../api/pwsso.proto -c82d38b9b1c190688fea61507fda341ae4209349 Makefile d508c56ff122e79fec0b2b44a5de8f75353ee153 ../api/pwdb.proto diff --git a/go/go.mod b/go.mod similarity index 98% rename from go/go.mod rename to go.mod index feee8d2df..640ca0528 100644 --- a/go/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module pathwar.land/go/v2 +module pathwar.land/v2 require ( github.com/Microsoft/go-winio v0.4.14 // indirect diff --git a/go/go.sum b/go.sum similarity index 100% rename from go/go.sum rename to go.sum diff --git a/go/.dockerignore b/go/.dockerignore deleted file mode 100644 index a0aacae72..000000000 --- a/go/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -*~ -*# -.#* -coverage.txt -Dockerfile -docker-compose.yml -vendor/ -out/ diff --git a/go/Makefile b/go/Makefile index 9a27deeac..aa27549ed 100644 --- a/go/Makefile +++ b/go/Makefile @@ -1,10 +1,12 @@ ## moul/rules.mk GOPATH ?= $(HOME)/go -GOPKG = pathwar.land/go -GOBINS = ./cmd/pathwar ./cmd/pwinit -DOCKER_IMAGE = pathwar/pathwar +GOMOD_DIR = .. +GOPKG = pathwar.land +GOBINS = ./cmd/pathwar ./cmd/pwinit +DOCKER_IMAGE =pathwar/pathwar +DOCKERFILE_PATH = ../Dockerfile -GO_INSTALL_OPTS = -v -ldflags "-s -w -X pathwar.land/go/v2/pkg/pwversion.Version=`git describe --tags --abbrev` -X pathwar.land/go/pkg/pwversion.Commit=`git rev-parse HEAD` -X pathwar.land/go/pkg/pwversion.Date=`date +%s` -X pathwar.land/go/pkg/pwversion.BuiltBy=makefile" +GO_INSTALL_OPTS = -v -ldflags "-s -w -X pathwar.land/v2/go/pkg/pwversion.Version=`git describe --tags --abbrev` -X pathwar.land/go/pkg/pwversion.Commit=`git rev-parse HEAD` -X pathwar.land/go/pkg/pwversion.Date=`date +%s` -X pathwar.land/go/pkg/pwversion.BuiltBy=makefile" PRE_INSTALL_STEPS += generate PRE_UNITTEST_STEPS += generate PRE_TEST_STEPS += generate @@ -92,10 +94,10 @@ gen.sum: $(GEN_SRC) .PHONY: generate_local generate_local: @set -e; for proto in $(PROTOS_SRC); do ( set -xe; \ - protoc -I ../go/vendor/github.com/grpc-ecosystem/grpc-gateway:../api:../go/vendor:/protobuf --grpc-gateway_out=logtostderr=true:"$(GOPATH)/src" --gogofaster_out="plugins=grpc:$(GOPATH)/src" "$$proto" \ + protoc -I ../vendor/github.com/grpc-ecosystem/grpc-gateway:../api:../vendor:/protobuf --grpc-gateway_out=logtostderr=true:"$(GOPATH)/src" --gogofaster_out="plugins=grpc:$(GOPATH)/src" "$$proto" \ ); done @### custom - sed -i s@pathwar.land/go/pkg@pathwar.land/go/v2/pkg@ ./pkg/*/*.pb.go + sed -i s@pathwar.land/go/pkg@pathwar.land/v2/go/pkg@ ./pkg/*/*.pb.go @### end of custom goimports -w ./pkg ./cmd ./internal shasum $(GEN_SRC) | sort > gen.sum.tmp diff --git a/go/cmd/pathwar/main.go b/go/cmd/pathwar/main.go index ed54032ac..f61214720 100644 --- a/go/cmd/pathwar/main.go +++ b/go/cmd/pathwar/main.go @@ -25,14 +25,14 @@ import ( "go.uber.org/zap/zapcore" "golang.org/x/oauth2" "moul.io/srand" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwagent" - "pathwar.land/go/v2/pkg/pwapi" - "pathwar.land/go/v2/pkg/pwcompose" - "pathwar.land/go/v2/pkg/pwdb" - "pathwar.land/go/v2/pkg/pwinit" - "pathwar.land/go/v2/pkg/pwsso" - "pathwar.land/go/v2/pkg/pwversion" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwagent" + "pathwar.land/v2/go/pkg/pwapi" + "pathwar.land/v2/go/pkg/pwcompose" + "pathwar.land/v2/go/pkg/pwdb" + "pathwar.land/v2/go/pkg/pwinit" + "pathwar.land/v2/go/pkg/pwsso" + "pathwar.land/v2/go/pkg/pwversion" ) const ( diff --git a/go/cmd/pwinit/main.go b/go/cmd/pwinit/main.go index e2bf42186..a6d63bd79 100644 --- a/go/cmd/pwinit/main.go +++ b/go/cmd/pwinit/main.go @@ -13,8 +13,8 @@ import ( "syscall" "github.com/peterbourgon/ff/ffcli" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwinit" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwinit" ) func main() { diff --git a/go/doc.go b/go/doc.go index 911ab6ee7..bffe69a56 100644 --- a/go/doc.go +++ b/go/doc.go @@ -1 +1 @@ -package pathwar // import "pathwar.land/go/v2" +package pathwar // import "pathwar.land/v2/go" diff --git a/go/gen.sum b/go/gen.sum index 6047f92c1..4d9fff5ea 100644 --- a/go/gen.sum +++ b/go/gen.sum @@ -1,4 +1,4 @@ -033f9563307b21f1eec3aa6f81b4e7b1d74ea904 Makefile +01df848e2bb62d2cce01511d60dc535bb80abc47 Makefile 4362a2715e8c2053c4bec93585b01ca252dae2e7 ../api/pwagent.proto 70d67f1cebb3b7f9e86fd0197d43db4c1f795f65 ../api/pwinit.proto a45fa08c595709dd752f52ded4493ceb3a191de2 ../api/pwcompose.proto diff --git a/go/internal/randstring/randstring.go b/go/internal/randstring/randstring.go index 4a13ee844..b0d361b5f 100644 --- a/go/internal/randstring/randstring.go +++ b/go/internal/randstring/randstring.go @@ -1,4 +1,4 @@ -package randstring // import "pathwar.land/go/v2/internal/randstring" +package randstring // import "pathwar.land/v2/go/internal/randstring" import "math/rand" diff --git a/go/internal/testutil/doc.go b/go/internal/testutil/doc.go index 848bb3608..ddbbc1f2f 100644 --- a/go/internal/testutil/doc.go +++ b/go/internal/testutil/doc.go @@ -1 +1 @@ -package testutil // import "pathwar.land/go/v2/internal/testutil" +package testutil // import "pathwar.land/v2/go/internal/testutil" diff --git a/go/pkg/errcode/doc.go b/go/pkg/errcode/doc.go index 7d6edaddc..ad3bc59c2 100644 --- a/go/pkg/errcode/doc.go +++ b/go/pkg/errcode/doc.go @@ -1 +1 @@ -package errcode // import "pathwar.land/go/v2/pkg/errcode" +package errcode // import "pathwar.land/v2/go/pkg/errcode" diff --git a/go/pkg/pwagent/api.go b/go/pkg/pwagent/api.go index 984b9f8bc..a45abe708 100644 --- a/go/pkg/pwagent/api.go +++ b/go/pkg/pwagent/api.go @@ -8,8 +8,8 @@ import ( "github.com/gogo/protobuf/jsonpb" "go.uber.org/zap" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwapi" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwapi" ) func fetchAPIInstances(ctx context.Context, apiClient *http.Client, httpAPIAddr string, agentName string, logger *zap.Logger) (*pwapi.AgentListInstances_Output, error) { diff --git a/go/pkg/pwagent/daemon.go b/go/pkg/pwagent/daemon.go index 6a45b42d6..25fa0857f 100644 --- a/go/pkg/pwagent/daemon.go +++ b/go/pkg/pwagent/daemon.go @@ -7,8 +7,8 @@ import ( "github.com/docker/docker/client" "go.uber.org/zap" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwcompose" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwcompose" ) func Daemon(ctx context.Context, cli *client.Client, apiClient *http.Client, opts Opts) error { diff --git a/go/pkg/pwagent/doc.go b/go/pkg/pwagent/doc.go index d30abe536..054767c68 100644 --- a/go/pkg/pwagent/doc.go +++ b/go/pkg/pwagent/doc.go @@ -1 +1 @@ -package pwagent // import "pathwar.land/go/v2/pkg/pwagent" +package pwagent // import "pathwar.land/v2/go/pkg/pwagent" diff --git a/go/pkg/pwagent/docker.go b/go/pkg/pwagent/docker.go index 3733d88d0..d824bd383 100644 --- a/go/pkg/pwagent/docker.go +++ b/go/pkg/pwagent/docker.go @@ -9,11 +9,11 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" "go.uber.org/zap" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwapi" - "pathwar.land/go/v2/pkg/pwcompose" - "pathwar.land/go/v2/pkg/pwdb" - "pathwar.land/go/v2/pkg/pwinit" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwapi" + "pathwar.land/v2/go/pkg/pwcompose" + "pathwar.land/v2/go/pkg/pwdb" + "pathwar.land/v2/go/pkg/pwinit" ) func applyDockerConfig(ctx context.Context, apiInstances *pwapi.AgentListInstances_Output, dockerClient *client.Client, opts Opts) error { diff --git a/go/pkg/pwagent/nginx.go b/go/pkg/pwagent/nginx.go index 49fce2445..a7216b275 100644 --- a/go/pkg/pwagent/nginx.go +++ b/go/pkg/pwagent/nginx.go @@ -21,10 +21,10 @@ import ( "go.uber.org/zap" "golang.org/x/crypto/sha3" "moul.io/godev" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwapi" - "pathwar.land/go/v2/pkg/pwcompose" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwapi" + "pathwar.land/v2/go/pkg/pwcompose" + "pathwar.land/v2/go/pkg/pwdb" ) func applyNginxConfig(ctx context.Context, apiInstances *pwapi.AgentListInstances_Output, dockerClient *client.Client, opts Opts) error { diff --git a/go/pkg/pwagent/types.go b/go/pkg/pwagent/types.go index 5c79f657d..051809a17 100644 --- a/go/pkg/pwagent/types.go +++ b/go/pkg/pwagent/types.go @@ -4,7 +4,7 @@ import ( "time" "go.uber.org/zap" - "pathwar.land/go/v2/internal/randstring" + "pathwar.land/v2/go/internal/randstring" ) type Opts struct { diff --git a/go/pkg/pwapi/api_agent-list-instances.go b/go/pkg/pwapi/api_agent-list-instances.go index 323206c8b..449a8802a 100644 --- a/go/pkg/pwapi/api_agent-list-instances.go +++ b/go/pkg/pwapi/api_agent-list-instances.go @@ -4,8 +4,8 @@ import ( "context" "go.uber.org/zap" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) AgentListInstances(ctx context.Context, in *AgentListInstances_Input) (*AgentListInstances_Output, error) { diff --git a/go/pkg/pwapi/api_agent-list-instances_test.go b/go/pkg/pwapi/api_agent-list-instances_test.go index bd15badf6..26ea9ef05 100644 --- a/go/pkg/pwapi/api_agent-list-instances_test.go +++ b/go/pkg/pwapi/api_agent-list-instances_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/errcode" ) func TestService_AgentListInstances(t *testing.T) { diff --git a/go/pkg/pwapi/api_agent-list.go b/go/pkg/pwapi/api_agent-list.go index 3ed5bb123..3c2b8a66f 100644 --- a/go/pkg/pwapi/api_agent-list.go +++ b/go/pkg/pwapi/api_agent-list.go @@ -3,7 +3,7 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/pkg/errcode" ) func (svc *service) AgentList(context.Context, *AgentList_Input) (*AgentList_Output, error) { diff --git a/go/pkg/pwapi/api_agent-register.go b/go/pkg/pwapi/api_agent-register.go index 3375173d6..2d1ae6958 100644 --- a/go/pkg/pwapi/api_agent-register.go +++ b/go/pkg/pwapi/api_agent-register.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) AgentRegister(ctx context.Context, in *AgentRegister_Input) (*AgentRegister_Output, error) { diff --git a/go/pkg/pwapi/api_agent-register_test.go b/go/pkg/pwapi/api_agent-register_test.go index d0e184b61..f7776fed7 100644 --- a/go/pkg/pwapi/api_agent-register_test.go +++ b/go/pkg/pwapi/api_agent-register_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/errcode" ) func TestService_AgentRegister(t *testing.T) { diff --git a/go/pkg/pwapi/api_agent-update-state.go b/go/pkg/pwapi/api_agent-update-state.go index 3f09699b9..6c3bb2099 100644 --- a/go/pkg/pwapi/api_agent-update-state.go +++ b/go/pkg/pwapi/api_agent-update-state.go @@ -3,7 +3,7 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/pkg/errcode" ) func (svc *service) AgentUpdateState(context.Context, *AgentUpdateState_Input) (*AgentUpdateState_Output, error) { diff --git a/go/pkg/pwapi/api_challenge-get.go b/go/pkg/pwapi/api_challenge-get.go index cb2d8d1ec..f97d13c52 100644 --- a/go/pkg/pwapi/api_challenge-get.go +++ b/go/pkg/pwapi/api_challenge-get.go @@ -3,8 +3,8 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) ChallengeGet(ctx context.Context, in *ChallengeGet_Input) (*ChallengeGet_Output, error) { diff --git a/go/pkg/pwapi/api_challenge-get_test.go b/go/pkg/pwapi/api_challenge-get_test.go index 2d38e5ade..6539baa96 100644 --- a/go/pkg/pwapi/api_challenge-get_test.go +++ b/go/pkg/pwapi/api_challenge-get_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/errcode" ) func TestService_ChallengeGet(t *testing.T) { diff --git a/go/pkg/pwapi/api_challenge-list.go b/go/pkg/pwapi/api_challenge-list.go index 376be5085..28ade4512 100644 --- a/go/pkg/pwapi/api_challenge-list.go +++ b/go/pkg/pwapi/api_challenge-list.go @@ -3,7 +3,7 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/pkg/errcode" ) func (svc *service) ChallengeList(context.Context, *ChallengeList_Input) (*ChallengeList_Output, error) { diff --git a/go/pkg/pwapi/api_challenge-subscription-close.go b/go/pkg/pwapi/api_challenge-subscription-close.go index 56b6e87fb..1267ee1ce 100644 --- a/go/pkg/pwapi/api_challenge-subscription-close.go +++ b/go/pkg/pwapi/api_challenge-subscription-close.go @@ -4,8 +4,8 @@ import ( "context" "time" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) ChallengeSubscriptionClose(ctx context.Context, in *ChallengeSubscriptionClose_Input) (*ChallengeSubscriptionClose_Output, error) { diff --git a/go/pkg/pwapi/api_challenge-subscription-close_test.go b/go/pkg/pwapi/api_challenge-subscription-close_test.go index ef4dcf820..388f6c56a 100644 --- a/go/pkg/pwapi/api_challenge-subscription-close_test.go +++ b/go/pkg/pwapi/api_challenge-subscription-close_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func TestSvc_ChallengeSubscriptionClose(t *testing.T) { diff --git a/go/pkg/pwapi/api_challenge-subscription-validate.go b/go/pkg/pwapi/api_challenge-subscription-validate.go index 17f167e2e..8e715f907 100644 --- a/go/pkg/pwapi/api_challenge-subscription-validate.go +++ b/go/pkg/pwapi/api_challenge-subscription-validate.go @@ -3,8 +3,8 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) ChallengeSubscriptionValidate(ctx context.Context, in *ChallengeSubscriptionValidate_Input) (*ChallengeSubscriptionValidate_Output, error) { diff --git a/go/pkg/pwapi/api_challenge-subscription-validate_test.go b/go/pkg/pwapi/api_challenge-subscription-validate_test.go index 2cab323c2..729ad6632 100644 --- a/go/pkg/pwapi/api_challenge-subscription-validate_test.go +++ b/go/pkg/pwapi/api_challenge-subscription-validate_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func TestSvc_ChallengeSubscriptionValidate(t *testing.T) { diff --git a/go/pkg/pwapi/api_coupon-validate.go b/go/pkg/pwapi/api_coupon-validate.go index da7fef016..b123c3964 100644 --- a/go/pkg/pwapi/api_coupon-validate.go +++ b/go/pkg/pwapi/api_coupon-validate.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) CouponValidate(ctx context.Context, in *CouponValidate_Input) (*CouponValidate_Output, error) { diff --git a/go/pkg/pwapi/api_coupon-validate_test.go b/go/pkg/pwapi/api_coupon-validate_test.go index 4222f558d..bf747266a 100644 --- a/go/pkg/pwapi/api_coupon-validate_test.go +++ b/go/pkg/pwapi/api_coupon-validate_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/errcode" ) func TestEngine_CouponValidate(t *testing.T) { diff --git a/go/pkg/pwapi/api_organization-list.go b/go/pkg/pwapi/api_organization-list.go index 160486fc7..bfe73ec9c 100644 --- a/go/pkg/pwapi/api_organization-list.go +++ b/go/pkg/pwapi/api_organization-list.go @@ -3,8 +3,8 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) OrganizationList(context.Context, *OrganizationList_Input) (*OrganizationList_Output, error) { diff --git a/go/pkg/pwapi/api_season-challenge-buy.go b/go/pkg/pwapi/api_season-challenge-buy.go index 781d743ef..d18be4082 100644 --- a/go/pkg/pwapi/api_season-challenge-buy.go +++ b/go/pkg/pwapi/api_season-challenge-buy.go @@ -3,8 +3,8 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) SeasonChallengeBuy(ctx context.Context, in *SeasonChallengeBuy_Input) (*SeasonChallengeBuy_Output, error) { diff --git a/go/pkg/pwapi/api_season-challenge-buy_test.go b/go/pkg/pwapi/api_season-challenge-buy_test.go index 1f7245596..0aecf5662 100644 --- a/go/pkg/pwapi/api_season-challenge-buy_test.go +++ b/go/pkg/pwapi/api_season-challenge-buy_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/errcode" ) func TestSvc_ChallengeBuy(t *testing.T) { diff --git a/go/pkg/pwapi/api_season-challenge-get.go b/go/pkg/pwapi/api_season-challenge-get.go index 5b7c2ef7a..f82bf5afe 100644 --- a/go/pkg/pwapi/api_season-challenge-get.go +++ b/go/pkg/pwapi/api_season-challenge-get.go @@ -3,8 +3,8 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) SeasonChallengeGet(ctx context.Context, in *SeasonChallengeGet_Input) (*SeasonChallengeGet_Output, error) { diff --git a/go/pkg/pwapi/api_season-challenge-get_test.go b/go/pkg/pwapi/api_season-challenge-get_test.go index 62579580d..1b693a42e 100644 --- a/go/pkg/pwapi/api_season-challenge-get_test.go +++ b/go/pkg/pwapi/api_season-challenge-get_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/errcode" ) func TestSvc_SeasonChallengeGet(t *testing.T) { diff --git a/go/pkg/pwapi/api_season-challenge-list.go b/go/pkg/pwapi/api_season-challenge-list.go index 4fb3d37a4..2298bb514 100644 --- a/go/pkg/pwapi/api_season-challenge-list.go +++ b/go/pkg/pwapi/api_season-challenge-list.go @@ -3,8 +3,8 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) SeasonChallengeList(ctx context.Context, in *SeasonChallengeList_Input) (*SeasonChallengeList_Output, error) { diff --git a/go/pkg/pwapi/api_season-challenge-list_test.go b/go/pkg/pwapi/api_season-challenge-list_test.go index 4d166c0eb..791fe907e 100644 --- a/go/pkg/pwapi/api_season-challenge-list_test.go +++ b/go/pkg/pwapi/api_season-challenge-list_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/errcode" ) func TestSvc_SeasonChallengeList(t *testing.T) { diff --git a/go/pkg/pwapi/api_team-accept-invite.go b/go/pkg/pwapi/api_team-accept-invite.go index b684dc713..f958ec064 100644 --- a/go/pkg/pwapi/api_team-accept-invite.go +++ b/go/pkg/pwapi/api_team-accept-invite.go @@ -3,7 +3,7 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/pkg/errcode" ) func (svc *service) TeamAcceptInvite(ctx context.Context, in *TeamAcceptInvite_Input) (*TeamAcceptInvite_Output, error) { diff --git a/go/pkg/pwapi/api_team-create.go b/go/pkg/pwapi/api_team-create.go index f5437cbd7..0eb284f68 100644 --- a/go/pkg/pwapi/api_team-create.go +++ b/go/pkg/pwapi/api_team-create.go @@ -4,8 +4,8 @@ import ( "context" "strings" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) TeamCreate(ctx context.Context, in *TeamCreate_Input) (*TeamCreate_Output, error) { diff --git a/go/pkg/pwapi/api_team-create_test.go b/go/pkg/pwapi/api_team-create_test.go index c5aa904fe..f851bfee7 100644 --- a/go/pkg/pwapi/api_team-create_test.go +++ b/go/pkg/pwapi/api_team-create_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func TestSvc_TeamCreate(t *testing.T) { diff --git a/go/pkg/pwapi/api_team-get.go b/go/pkg/pwapi/api_team-get.go index 2929427bd..b2cf9f59d 100644 --- a/go/pkg/pwapi/api_team-get.go +++ b/go/pkg/pwapi/api_team-get.go @@ -4,8 +4,8 @@ import ( "context" "math/rand" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) TeamGet(ctx context.Context, in *TeamGet_Input) (*TeamGet_Output, error) { diff --git a/go/pkg/pwapi/api_team-get_test.go b/go/pkg/pwapi/api_team-get_test.go index 188e67e78..94ebc9734 100644 --- a/go/pkg/pwapi/api_team-get_test.go +++ b/go/pkg/pwapi/api_team-get_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/errcode" ) func TestSvc_TeamGet(t *testing.T) { diff --git a/go/pkg/pwapi/api_team-list.go b/go/pkg/pwapi/api_team-list.go index f49188d28..578991714 100644 --- a/go/pkg/pwapi/api_team-list.go +++ b/go/pkg/pwapi/api_team-list.go @@ -4,8 +4,8 @@ import ( "context" "math/rand" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) TeamList(ctx context.Context, in *TeamList_Input) (*TeamList_Output, error) { diff --git a/go/pkg/pwapi/api_team-list_test.go b/go/pkg/pwapi/api_team-list_test.go index 41d99a3a0..611e135c5 100644 --- a/go/pkg/pwapi/api_team-list_test.go +++ b/go/pkg/pwapi/api_team-list_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/errcode" ) func TestSvc_TeamList(t *testing.T) { diff --git a/go/pkg/pwapi/api_team-send-invite.go b/go/pkg/pwapi/api_team-send-invite.go index c87f47c4b..eaa9078a8 100644 --- a/go/pkg/pwapi/api_team-send-invite.go +++ b/go/pkg/pwapi/api_team-send-invite.go @@ -3,7 +3,7 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/pkg/errcode" ) func (svc *service) TeamSendInvite(ctx context.Context, in *TeamSendInvite_Input) (*TeamSendInvite_Output, error) { diff --git a/go/pkg/pwapi/api_tool-dbdump.go b/go/pkg/pwapi/api_tool-dbdump.go index 664d12790..8e00eba3e 100644 --- a/go/pkg/pwapi/api_tool-dbdump.go +++ b/go/pkg/pwapi/api_tool-dbdump.go @@ -3,7 +3,7 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) ToolDBDump(context.Context, *Void) (*pwdb.Dump, error) { diff --git a/go/pkg/pwapi/api_tool-generate-fake-data.go b/go/pkg/pwapi/api_tool-generate-fake-data.go index ef3337d49..9cd54e2a9 100644 --- a/go/pkg/pwapi/api_tool-generate-fake-data.go +++ b/go/pkg/pwapi/api_tool-generate-fake-data.go @@ -3,7 +3,7 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) ToolGenerateFakeData(context.Context, *Void) (*Void, error) { diff --git a/go/pkg/pwapi/api_tool-info.go b/go/pkg/pwapi/api_tool-info.go index 06a540248..285d4b03d 100644 --- a/go/pkg/pwapi/api_tool-info.go +++ b/go/pkg/pwapi/api_tool-info.go @@ -4,7 +4,7 @@ import ( "context" "time" - "pathwar.land/go/v2/pkg/pwversion" + "pathwar.land/v2/go/pkg/pwversion" ) func (svc *service) ToolInfo(context.Context, *GetInfo_Input) (*GetInfo_Output, error) { diff --git a/go/pkg/pwapi/api_tool-info_test.go b/go/pkg/pwapi/api_tool-info_test.go index da47658c2..b00a5b08f 100644 --- a/go/pkg/pwapi/api_tool-info_test.go +++ b/go/pkg/pwapi/api_tool-info_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "pathwar.land/go/v2/internal/testutil" + "pathwar.land/v2/go/internal/testutil" ) func TestEngine_ToolInfo(t *testing.T) { diff --git a/go/pkg/pwapi/api_tool-status_test.go b/go/pkg/pwapi/api_tool-status_test.go index 8fb386e8e..b0ad2851a 100644 --- a/go/pkg/pwapi/api_tool-status_test.go +++ b/go/pkg/pwapi/api_tool-status_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "pathwar.land/go/v2/internal/testutil" + "pathwar.land/v2/go/internal/testutil" ) func TestSvc_GetStatus(t *testing.T) { diff --git a/go/pkg/pwapi/api_user-delete-account.go b/go/pkg/pwapi/api_user-delete-account.go index 242d9e25a..7866bab46 100644 --- a/go/pkg/pwapi/api_user-delete-account.go +++ b/go/pkg/pwapi/api_user-delete-account.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) UserDeleteAccount(ctx context.Context, in *UserDeleteAccount_Input) (*UserDeleteAccount_Output, error) { diff --git a/go/pkg/pwapi/api_user-delete-account_test.go b/go/pkg/pwapi/api_user-delete-account_test.go index 980bae6a7..c3e2e4c14 100644 --- a/go/pkg/pwapi/api_user-delete-account_test.go +++ b/go/pkg/pwapi/api_user-delete-account_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "pathwar.land/go/v2/internal/testutil" + "pathwar.land/v2/go/internal/testutil" ) func TestSvc_UserDeleteAccount(t *testing.T) { diff --git a/go/pkg/pwapi/api_user-get-session.go b/go/pkg/pwapi/api_user-get-session.go index 67065b7da..2e65c1c1f 100644 --- a/go/pkg/pwapi/api_user-get-session.go +++ b/go/pkg/pwapi/api_user-get-session.go @@ -7,9 +7,9 @@ import ( "math/rand" "go.uber.org/zap" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" - "pathwar.land/go/v2/pkg/pwsso" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" + "pathwar.land/v2/go/pkg/pwsso" ) func (svc *service) UserGetSession(ctx context.Context, _ *UserGetSession_Input) (*UserGetSession_Output, error) { diff --git a/go/pkg/pwapi/api_user-get-session_test.go b/go/pkg/pwapi/api_user-get-session_test.go index 3bb44e599..5e2e189eb 100644 --- a/go/pkg/pwapi/api_user-get-session_test.go +++ b/go/pkg/pwapi/api_user-get-session_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "moul.io/godev" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/pwsso" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/pwsso" ) func TestSvc_UserGetSession(t *testing.T) { diff --git a/go/pkg/pwapi/api_user-set-preferences.go b/go/pkg/pwapi/api_user-set-preferences.go index 36867a14f..b48a2f03a 100644 --- a/go/pkg/pwapi/api_user-set-preferences.go +++ b/go/pkg/pwapi/api_user-set-preferences.go @@ -3,8 +3,8 @@ package pwapi import ( "context" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" ) func (svc *service) UserSetPreferences(ctx context.Context, in *UserSetPreferences_Input) (*UserSetPreferences_Output, error) { diff --git a/go/pkg/pwapi/api_user-set-preferences_test.go b/go/pkg/pwapi/api_user-set-preferences_test.go index 1b61e8fd4..8b3251109 100644 --- a/go/pkg/pwapi/api_user-set-preferences_test.go +++ b/go/pkg/pwapi/api_user-set-preferences_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "pathwar.land/go/v2/internal/testutil" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/internal/testutil" + "pathwar.land/v2/go/pkg/errcode" ) func TestSvc_UserSetPreferences(t *testing.T) { diff --git a/go/pkg/pwapi/auth.go b/go/pkg/pwapi/auth.go index 4783b40d7..c1f51396b 100644 --- a/go/pkg/pwapi/auth.go +++ b/go/pkg/pwapi/auth.go @@ -7,9 +7,9 @@ import ( "github.com/dgrijalva/jwt-go" "github.com/jinzhu/gorm" "google.golang.org/grpc/metadata" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" - "pathwar.land/go/v2/pkg/pwsso" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" + "pathwar.land/v2/go/pkg/pwsso" ) type ctxKey string diff --git a/go/pkg/pwapi/doc.go b/go/pkg/pwapi/doc.go index fb7b0423c..db10e67c6 100644 --- a/go/pkg/pwapi/doc.go +++ b/go/pkg/pwapi/doc.go @@ -1 +1 @@ -package pwapi // import "pathwar.land/go/v2/pkg/pwapi" +package pwapi // import "pathwar.land/v2/go/pkg/pwapi" diff --git a/go/pkg/pwapi/helpers.go b/go/pkg/pwapi/helpers.go index 182b9ca4e..f5daaaf9d 100644 --- a/go/pkg/pwapi/helpers.go +++ b/go/pkg/pwapi/helpers.go @@ -2,7 +2,7 @@ package pwapi import ( "github.com/jinzhu/gorm" - "pathwar.land/go/v2/pkg/pwdb" + "pathwar.land/v2/go/pkg/pwdb" ) func userTeamForSeason(db *gorm.DB, userID, seasonID int64) (*pwdb.Team, error) { diff --git a/go/pkg/pwapi/pwapi.pb.go b/go/pkg/pwapi/pwapi.pb.go index 9394062da..9120ac5df 100644 --- a/go/pkg/pwapi/pwapi.pb.go +++ b/go/pkg/pwapi/pwapi.pb.go @@ -17,8 +17,8 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - pwdb "pathwar.land/go/v2/pkg/pwdb" - pwsso "pathwar.land/go/v2/pkg/pwsso" + pwdb "pathwar.land/v2/go/pkg/pwdb" + pwsso "pathwar.land/v2/go/pkg/pwsso" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/go/pkg/pwapi/server.go b/go/pkg/pwapi/server.go index cfc9806bd..d6dbb6d4e 100644 --- a/go/pkg/pwapi/server.go +++ b/go/pkg/pwapi/server.go @@ -23,7 +23,7 @@ import ( chilogger "github.com/treastech/logger" "go.uber.org/zap" "google.golang.org/grpc" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/pkg/errcode" ) func NewServer(ctx context.Context, svc Service, opts ServerOpts) (*Server, error) { diff --git a/go/pkg/pwapi/server_test.go b/go/pkg/pwapi/server_test.go index c5281c203..dbcad864a 100644 --- a/go/pkg/pwapi/server_test.go +++ b/go/pkg/pwapi/server_test.go @@ -10,7 +10,7 @@ import ( _ "github.com/jinzhu/gorm/dialects/sqlite" "github.com/stretchr/testify/assert" "moul.io/godev" - "pathwar.land/go/v2/internal/testutil" + "pathwar.land/v2/go/internal/testutil" ) func TestServer(t *testing.T) { diff --git a/go/pkg/pwapi/service.go b/go/pkg/pwapi/service.go index 57910d56c..99c3f86a1 100644 --- a/go/pkg/pwapi/service.go +++ b/go/pkg/pwapi/service.go @@ -6,8 +6,8 @@ import ( "github.com/bwmarrin/snowflake" "github.com/jinzhu/gorm" "go.uber.org/zap" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwsso" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwsso" ) type Service interface { diff --git a/go/pkg/pwapi/testing.go b/go/pkg/pwapi/testing.go index 23b88f42e..e7b472e7e 100644 --- a/go/pkg/pwapi/testing.go +++ b/go/pkg/pwapi/testing.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/zap" "google.golang.org/grpc" - "pathwar.land/go/v2/pkg/pwdb" - "pathwar.land/go/v2/pkg/pwsso" + "pathwar.land/v2/go/pkg/pwdb" + "pathwar.land/v2/go/pkg/pwsso" ) func TestingService(t *testing.T, opts ServiceOpts) (Service, func()) { diff --git a/go/pkg/pwapi/testing_test.go b/go/pkg/pwapi/testing_test.go index f1821e168..842641225 100644 --- a/go/pkg/pwapi/testing_test.go +++ b/go/pkg/pwapi/testing_test.go @@ -6,9 +6,9 @@ import ( "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwdb" - "pathwar.land/go/v2/pkg/pwsso" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwdb" + "pathwar.land/v2/go/pkg/pwsso" ) func testingSeasons(t *testing.T, svc Service) *pwdb.SeasonList { diff --git a/go/pkg/pwcompose/compose.go b/go/pkg/pwcompose/compose.go index b809f72c5..cdec8c9c8 100644 --- a/go/pkg/pwcompose/compose.go +++ b/go/pkg/pwcompose/compose.go @@ -22,9 +22,9 @@ import ( "github.com/olekukonko/tablewriter" "go.uber.org/zap" "gopkg.in/yaml.v3" - "pathwar.land/go/v2/internal/randstring" - "pathwar.land/go/v2/pkg/errcode" - "pathwar.land/go/v2/pkg/pwinit" + "pathwar.land/v2/go/internal/randstring" + "pathwar.land/v2/go/pkg/errcode" + "pathwar.land/v2/go/pkg/pwinit" ) const ( diff --git a/go/pkg/pwcompose/doc.go b/go/pkg/pwcompose/doc.go index 8e0b1d56a..30688080b 100644 --- a/go/pkg/pwcompose/doc.go +++ b/go/pkg/pwcompose/doc.go @@ -1 +1 @@ -package pwcompose // import "pathwar.land/go/v2/pkg/pwcompose" +package pwcompose // import "pathwar.land/v2/go/pkg/pwcompose" diff --git a/go/pkg/pwdb/db.go b/go/pkg/pwdb/db.go index f24e47221..9a46ff818 100644 --- a/go/pkg/pwdb/db.go +++ b/go/pkg/pwdb/db.go @@ -5,7 +5,7 @@ import ( "github.com/jinzhu/gorm" "go.uber.org/zap" "moul.io/zapgorm" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/pkg/errcode" ) type Opts struct { diff --git a/go/pkg/pwdb/doc.go b/go/pkg/pwdb/doc.go index 1b5887f1f..be7ea2370 100644 --- a/go/pkg/pwdb/doc.go +++ b/go/pkg/pwdb/doc.go @@ -1 +1 @@ -package pwdb // import "pathwar.land/go/v2/pkg/pwdb" +package pwdb // import "pathwar.land/v2/go/pkg/pwdb" diff --git a/go/pkg/pwdb/errors.go b/go/pkg/pwdb/errors.go index 9dd64ee60..657ba41aa 100644 --- a/go/pkg/pwdb/errors.go +++ b/go/pkg/pwdb/errors.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/jinzhu/gorm" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/pkg/errcode" ) func IsRecordNotFoundError(err error) bool { diff --git a/go/pkg/pwdb/helpers.go b/go/pkg/pwdb/helpers.go index c7159aad6..1abc75d8e 100644 --- a/go/pkg/pwdb/helpers.go +++ b/go/pkg/pwdb/helpers.go @@ -7,7 +7,7 @@ import ( "github.com/bwmarrin/snowflake" "github.com/jinzhu/gorm" "go.uber.org/zap" - "pathwar.land/go/v2/internal/randstring" + "pathwar.land/v2/go/internal/randstring" ) func GetInfo(db *gorm.DB, logger *zap.Logger) (*Info, error) { diff --git a/go/pkg/pwdb/migrations.go b/go/pkg/pwdb/migrations.go index ae74ade2a..d75934be4 100644 --- a/go/pkg/pwdb/migrations.go +++ b/go/pkg/pwdb/migrations.go @@ -4,7 +4,7 @@ import ( "github.com/bwmarrin/snowflake" "github.com/jinzhu/gorm" "gopkg.in/gormigrate.v1" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/pkg/errcode" ) func migrate(db *gorm.DB, sfn *snowflake.Node, opts Opts) error { diff --git a/go/pkg/pwinit/doc.go b/go/pkg/pwinit/doc.go index 03d80f0bd..5d756d7bc 100644 --- a/go/pkg/pwinit/doc.go +++ b/go/pkg/pwinit/doc.go @@ -1 +1 @@ -package pwinit // import "pathwar.land/go/v2/pkg/pwinit" +package pwinit // import "pathwar.land/v2/go/pkg/pwinit" diff --git a/go/pkg/pwsso/client.go b/go/pkg/pwsso/client.go index 4a8e056ad..85430d4b0 100644 --- a/go/pkg/pwsso/client.go +++ b/go/pkg/pwsso/client.go @@ -7,7 +7,7 @@ import ( jwt "github.com/dgrijalva/jwt-go" "go.uber.org/zap" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/pkg/errcode" ) type Opts struct { diff --git a/go/pkg/pwsso/doc.go b/go/pkg/pwsso/doc.go index abceffc2d..98dd644b1 100644 --- a/go/pkg/pwsso/doc.go +++ b/go/pkg/pwsso/doc.go @@ -1 +1 @@ -package pwsso // import "pathwar.land/go/v2/pkg/pwsso" +package pwsso // import "pathwar.land/v2/go/pkg/pwsso" diff --git a/go/pkg/pwsso/keycloak.go b/go/pkg/pwsso/keycloak.go index b38def0c5..6139153cd 100644 --- a/go/pkg/pwsso/keycloak.go +++ b/go/pkg/pwsso/keycloak.go @@ -6,7 +6,7 @@ import ( "github.com/keycloak/kcinit/rest" "go.uber.org/zap" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/pkg/errcode" ) const KeycloakBaseURL = "https://id.pathwar.land" diff --git a/go/pkg/pwsso/token.go b/go/pkg/pwsso/token.go index 7ac2add89..02fcdfa85 100644 --- a/go/pkg/pwsso/token.go +++ b/go/pkg/pwsso/token.go @@ -5,7 +5,7 @@ import ( jwt "github.com/dgrijalva/jwt-go" "go.uber.org/zap" - "pathwar.land/go/v2/pkg/errcode" + "pathwar.land/v2/go/pkg/errcode" ) func (c *client) TokenWithClaims(bearer string) (*jwt.Token, jwt.MapClaims, error) { diff --git a/go/pkg/pwversion/doc.go b/go/pkg/pwversion/doc.go index 0ca8480d5..05d889c38 100644 --- a/go/pkg/pwversion/doc.go +++ b/go/pkg/pwversion/doc.go @@ -1 +1 @@ -package pwversion // import "pathwar.land/go/v2/pkg/pwversion" +package pwversion // import "pathwar.land/v2/go/pkg/pwversion" diff --git a/rules.mk b/rules.mk index ba7ea8622..3287cb5ae 100644 --- a/rules.mk +++ b/rules.mk @@ -70,6 +70,7 @@ GO ?= go GOPATH ?= $(HOME)/go GO_INSTALL_OPTS ?= GO_TEST_OPTS ?= -test.timeout=30s +GOMOD_DIR ?= . ifdef GOBINS .PHONY: go.install @@ -91,7 +92,7 @@ endif .PHONY: go.unittest go.unittest: echo "" > /tmp/coverage.txt - @set -e; for dir in `find . -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ + @set -e; for dir in `find $(GOMOD_DIR) -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ cd $$dir; \ $(GO) test $(GO_TEST_OPTS) -cover -coverprofile=/tmp/profile.out -covermode=atomic -race ./...; \ if [ -f /tmp/profile.out ]; then \ @@ -102,28 +103,28 @@ go.unittest: .PHONY: go.lint go.lint: - @set -e; for dir in `find . -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ + @set -e; for dir in `find $(GOMOD_DIR) -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ cd $$dir; \ golangci-lint run --verbose ./...; \ ); done .PHONY: go.tidy go.tidy: - @set -e; for dir in `find . -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ + @set -e; for dir in `find $(GOMOD_DIR) -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ cd $$dir; \ $(GO) mod tidy; \ ); done .PHONY: go.build go.build: - @set -e; for dir in `find . -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ + @set -e; for dir in `find $(GOMOD_DIR) -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ cd $$dir; \ $(GO) build ./...; \ ); done .PHONY: go.bump-deps go.bumpdeps: - @set -e; for dir in `find . -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ + @set -e; for dir in `find $(GOMOD_DIR) -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ cd $$dir; \ $(GO) get -u ./...; \ ); done @@ -131,7 +132,7 @@ go.bumpdeps: .PHONY: go.bump-deps go.fmt: if ! command -v goimports &>/dev/null; then GO111MODULE=off go get golang.org/x/tools/cmd/goimports; fi - @set -e; for dir in `find . -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ + @set -e; for dir in `find $(GOMOD_DIR) -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ cd $$dir; \ goimports -w . \ ); done @@ -170,6 +171,9 @@ endif ## Docker ## +ifndef DOCKERFILE_PATH +DOCKERFILE_PATH = ./Dockerfile +endif ifndef DOCKER_IMAGE ifneq ($(wildcard Dockerfile),) DOCKER_IMAGE = $(notdir $(PWD)) @@ -183,7 +187,7 @@ docker.build: --build-arg VCS_REF=`git rev-parse --short HEAD` \ --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg VERSION=`git describe --tags --always` \ - -t $(DOCKER_IMAGE) . + -t $(DOCKER_IMAGE) -f $(DOCKERFILE_PATH) $(dir $(DOCKERFILE_PATH)) BUILD_STEPS += docker.build endif diff --git a/tool/integration/docker-compose.override.yml b/tool/integration/docker-compose.override.yml index 7157da722..fd5c6f192 100644 --- a/tool/integration/docker-compose.override.yml +++ b/tool/integration/docker-compose.override.yml @@ -7,7 +7,7 @@ services: - server server: - build: ../../go + build: ../.. ports: - 8000