Skip to content

parinlalilvo/setup-go-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

This project setup go path manual

How to setup shell go

How to test go version

  • $ go version
    • go version go1.19.2 darwin/amd64

How to get env with go

  • $ 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"
      

How to debug go with vscode

  • $ 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",
            }
        ]
      }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages