There are two options to provide the prerequisites. The first one is to install them all. The second is to use VS Code Remote Container. Visit the given link for the second option. Use the following guide if you prefer the first option.
-
Install Go
We use version 1.17. Follow Golang installation guideline.
-
Install golangci-lint
Follow golangci-lint installation. We use version 1.43.0 when we develop this project.
-
Install gomock
Follow gomock installation. We use version 1.6.0 when we develop this project.
-
Install golang-migrate
Follow golang-migrate. We use version 4.15.1 when we develop this project.
-
Install godog
Follow godog. We use version 0.12.0 when we develop this project.
-
Install Buf
Follow Buf installation. We use version 1.0.0-rc10 when we develop this project.
-
Install protolint
We use protolint to format and lint our protocol buffer files. We use version 0.35.2 when we develop this project.
-
Install clang-format
We use clang-format to format our protocol buffer files. We use version 11.1.0 when we develop this project.
-
Install
protoc-gen-go-grpc,protoc-gen-grpc-gateway,protoc-gen-openapiv2,protoc-gen-go$ go install \ github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \ github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \ google.golang.org/protobuf/cmd/protoc-gen-go \ google.golang.org/grpc/cmd/protoc-gen-go-grpcThat will place four binaries in $GOBIN;
protoc-gen-go-grpcprotoc-gen-grpc-gatewayprotoc-gen-openapiv2protoc-gen-go
Make sure that $GOBIN is in $PATH.
For more this section installation guide, please refer to grpc-gateway installation.
-
PostgreSQL
Follow PostgreSQL download.
-
CockroachDB (alternative for PostgreSQL, ignore if you prefer to use PostreSQL)
Follow CockroachDB Website.
-
Redis
Follow Redis installation.
-
Kafka
Follow Kafka installation.
-
Pre-commit (encouraged)
Follow pre-commit installation.
-
k6 (optional)
Follow k6 installation.
-
Revive (optional)
Follow revive installation.
reviveis currently only used in pre-commit. If pre-commit is not used, no need to installrevive. -
Gosec (optional)
Follow gosec installation.
gosecis currently only used in pre-commit. If pre-commit is not used, no need to installgosec. -
Staticcheck (optional)
Follow staticcheck installation.
staticcheckis currently only used in pre-commit. If pre-commit is not used, no need to installstaticcheck. -
Goreturns (optional)
Follow goreturns installation.
goreturnsis currently only used in pre-commit. If pre-commit is not used, no need to installgoreturns.