From 45221226aabf5143f3b8bd95671e0de2868ae1bf Mon Sep 17 00:00:00 2001 From: Tobias Pfandzelter Date: Tue, 5 May 2020 12:47:35 +0200 Subject: [PATCH 1/3] Update for Go modules `gvt` is deprecated, Go modules are the way to go. Fortunately `go mod` understands `gvt` manifests so building the project is easy now. Fixes #32 and #33 --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 61717df..b7c45f2 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,15 @@ Checkout the API Spec [here](http://microservices-demo.github.io/api/index?url=h ## Build #### Dependencies + +This project uses `gvt` for dependency management, which is outdated. +Instead, use Go modules: + ``` -cd $GOPATH/src/github.com/microservices-demo/payment/ -go get -u github.com/FiloSottile/gvt -gvt restore +go clone https://github.com/microservices-demo/payment +cd payment/ +go mod init +go mod vendor ``` #### Using native Go tools @@ -28,7 +33,7 @@ In order to build the project locally you need to make sure that the repository $GOPATH directory: $GOPATH/src/github.com/microservices-demo/payment/. Once that is in place you can build by running: ``` -cd $GOPATH/src/github.com/microservices-demo/payment/paymentsvc/ +cd ./cmd/paymentsvc/ go build -o payment ``` From d48878c7ee44a5e286a807ab45d0b02c70755447 Mon Sep 17 00:00:00 2001 From: Tobias Pfandzelter Date: Wed, 27 May 2020 11:22:22 +0200 Subject: [PATCH 2/3] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b7c45f2..6c3d899 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ This project uses `gvt` for dependency management, which is outdated. Instead, use Go modules: ``` -go clone https://github.com/microservices-demo/payment +git clone https://github.com/microservices-demo/payment cd payment/ go mod init go mod vendor From e57c0caa2088cdfa591e32e5aad39691f2f831e5 Mon Sep 17 00:00:00 2001 From: Tobias Pfandzelter Date: Wed, 27 May 2020 11:23:41 +0200 Subject: [PATCH 3/3] remove outdated information about $GOPATH --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6c3d899..e77c71e 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@ go mod init go mod vendor ``` -#### Using native Go tools -In order to build the project locally you need to make sure that the repository directory is located in the correct -$GOPATH directory: $GOPATH/src/github.com/microservices-demo/payment/. Once that is in place you can build by running: +#### Compile + +You can compile by running: ``` cd ./cmd/paymentsvc/