cannot download, $GOPATH not set

前端 未结 15 2158
闹比i
闹比i 2020-11-29 17:00

I want to install json2csv using go get github.com/jehiah/json2csv but I receive this error:

package github.com/jehiah/json2csv: cannot download         


        
15条回答
  •  暖寄归人
    2020-11-29 17:43

    Watch a Video

    In general, I always recommend this official video from Go to get a quick overview on the matter:

    http://www.youtube.com/watch?v=XCsL89YtqCs

    It's easier to be shown than to be told.

    @jwfearn paraphrased the important part of the video:

    export GOPATH="${HOME}/gocode"; export PATH="${PATH}:${GOPATH}/bin"; mkdir -p "${GOPATH}"

提交回复
热议问题