Configure go environment under linux

Because the domestic environment is set up after installing go under linux, some configuration is required.
First, install go:
download and install golang's official website is very simple, not to mention here.
2. Set GOPATH:
export GOPATH=/usr/local/go
export GOPATH=$GOPATH:/root/go// Set a go download package address here
3. Set domestic agent:
export GOPROXY=https://goproxy.io
Set domestic agent here. In this way, when you need to download other library files, there will be no special error.
Fourth, go-bindata data packaging configuration
go get -u github.com/jteeuwen/go-bindata/...
I need to use this package packaging resources when configuring artificial intelligence voice assistant.

Published 18 original articles · praised 31 · 50,000+ views

Guess you like

Origin blog.csdn.net/alvinlyb/article/details/103769331