Problem: you want to include the git SHA in your binary
Solution: Assuming the following code:
- you can run the binary like this: go run -ldflags “-X main.appVersion=$(git rev-parse HEAD)” main.go
- you can build it like this: go build -ldflags “-X main.appVersion=$(git rev-parse HEAD)” main.go