Skip to content

Commit

Permalink
Update for Go modules
Browse files Browse the repository at this point in the history
`gvt` is deprecated, Go modules are the way to go. Fortunately `go mod` understands `gvt` manifests so building the project is easy now.

Fixes microservices-demo#32 and microservices-demo#33
  • Loading branch information
pfandzelter authored May 5, 2020
1 parent 3c33dbf commit 4522122
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,23 @@ 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
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:

```
cd $GOPATH/src/github.com/microservices-demo/payment/paymentsvc/
cd ./cmd/paymentsvc/
go build -o payment
```

Expand Down

0 comments on commit 4522122

Please sign in to comment.