# 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` - Install shellcheck - Ubuntu: `apt install -y shellcheck` - 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 `.env` file to add environment variables