- Install oh-my-zsh
- zsh https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH
- brew install zsh
- oh-my-zsh https://ohmyz.sh/#install
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- Download go latest version https://go.dev/dl/
- Git clone project
git clone [email protected]:parinlalilvo/setup-go-path.git
- Go to directiories:
$ cd setup-go-path
$ ./setup.sh
- Done
$ go version
go version go1.19.2 darwin/amd64
$ go env
-
GO111MODULE="" GOARCH="amd64" GOBIN="/Users/parin.lalilvo/go/bin" GOCACHE="/Users/parin.lalilvo/Library/Caches/go-build" GOENV="/Users/parin.lalilvo/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/parin.lalilvo/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/parin.lalilvo/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/Users/parin.lalilvo/repositories/sdk/go-sdk/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/Users/parin.lalilvo/repositories/sdk/go-sdk/go/pkg/tool/darwin_amd64" GOVCS="" GOVERSION="go1.19.2" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/dev/null" GOWORK="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/xh/26kgnp2d1s55q1cc0b1fw_g40000gn/T/go-build3902625030=/tmp/go-build -gno-record-gcc-switches -fno-common"
-
-
$ brew install delve
-
$ touch .vscode/launch.json
-
$ vim .vscode/launch.json
-
{ "version": "0.2.0", "configurations": [ { "name": "Launch Package", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}/cmd/api", "envFile": "${workspaceFolder}/.env", } ] }
-