66fcc78887366e7175b8adda6fd8c3f00ab7a32d
Go Template
This repository is a template for golang projects with the assumption that is being run in a linux-based environment.
Using the following project as a baseline: https://github.com/golang-standards/project-layout.
Set Up
gRPC API
Remove queue folders, and bring grpc into super directory.
AWS SQS Listener
Remove grpc folders, and bring queue into super directory.
gRPC Gateway
Set up gRPC Gateway: https://github.com/grpc-ecosystem/grpc-gateway
Installation
- Install golang:
https://go.dev/doc/install - Add to ~/.profile or equivalent:
PATH=$PATH:/usr/local/go/bin PATH=$PATH:$(go env GOPATH)/bin - Restart terminal
- Install protoc:
https://grpc.io/docs/protoc-installation/- Ubuntu:
apt install -y protobuf-compiler - MacOS:
brew install protobuf
- Ubuntu:
- Install shellcheck
- Ubuntu:
apt install -y shellcheck
- Ubuntu:
- Ensure user in docker group and docker group is in sudo group
sudo groupadd docker sudo usermod -aG docker $USER - Run:
./scripts/install-deps.sh - Add to ~/.profile or equivalent:
eval "$(direnv hook bash)" - Restart terminal
- Create
.envfile to add environment variables
Description
Languages
Go
82.5%
Shell
11.7%
Python
3.5%
PLpgSQL
2.2%