This repo is part of the Marketplace team's Golang onboarding guide. Follow along using our step-by-step walkthrough!
- You will need to install both Go and the
protoc
compiler (version 3):
- Install the protobuf and Twirp plugins:
$ go install google.golang.org/protobuf/cmd/[email protected]
$ go install google.golang.org/grpc/cmd/[email protected]
$ go get google.golang.org/grpc
$ go get github.com/twitchtv/twirp/protoc-gen-twirp
- Update your
PATH
so theprotoc
compiler can find the plugins:
$ export PATH="$PATH:$(go env GOPATH)/bin"
Relevant docs:
You will need a Postgres instance running on the default port with a db called root
and a table called groceries
:
$ docker run --name grocery-list -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=password -d postgres
$ docker exec -it grocery-list psql
$ create table groceries ( id SERIAL PRIMARY KEY, item TEXT, quantity INT );