for China
GOPROXY=https://goproxy.io,direct
for other areas
GOPROXY=https://proxy.golang.org,direct
go run hello.go
output as "你好,世界。"
GOOS=linux GOARCH=amd64 go build
docker build --build-arg goproxy=${GOPROXY} -t hello-go .
docker run --rm hello-go
output as "Hello, world."
please notice
replace golang.org/x/text => github.com/golang/text v0.3.2
in go.mod