Install dependencies
go mod tidy
go mod vendor
Run the project using the following command
go run . --config-file=./config.yml
For testing we use https://github.com/golang/mock
GO111MODULE=on go get github.com/golang/mock/mockgen@latest
Generate mocks for unit test by running
go generate ./...
Run unit tests
go test -v ./...
TBD
We use docker to build this service
Build the image
docker build -t charlires/go-app .
Push image to docket hub
docker push charlires/go-app
Run container
docker run --rm -it -v `pwd`/config.yml:/etc/config/config.yml charlires/go-app
Generate Kubernetes Deployment files
kustomize build ./k8s/base > ./k8s/out/base.yml
kubectl config use-context docker-desktop
kubectl apply -f ./k8s/out/base.yml