-
-
Notifications
You must be signed in to change notification settings - Fork 135
Project Setup
Vivek edited this page Mar 14, 2022
·
11 revisions
- Install go with brew
brew install go
- Set the go bin path in
$HOME/.zshrc
export PATH=$PATH:$(go env GOPATH)/bin
- Install delve for debugging
go install github.com/go-delve/delve/cmd/[email protected]
- Install vscode
brew install --cask visual-studio-code
- Create a new repo
- Init the go module
go mod init github.com/vivekweb2013/quicknoter
- Install golang-migrate
brew install golang-migrate
- Add cobra
go get -u github.com/spf13/cobra@latest
- Install cobra-cli
go install github.com/spf13/cobra-cli@latest
- Init app with cobra-cli
cobra-cli init .
- Add more commands(i.e. serve) with cobra-cli
cobra-cli add serve
- Add gin
go get github.com/gin-gonic/gin
- Add Logrus for logging
go get -u github.com/sirupsen/logrus
- Add ozzo-validation
github.com/go-ozzo/ozzo-validation
- Add testify assert
go get github.com/stretchr/testify
- Add gomock
go install github.com/golang/mock/[email protected]
- Add gorm
go get gorm.io/gorm
- Add gorm postgres driver
gorm.io/driver/postgres
- Add errors
github.com/pkg/errors