Open kzhui125 opened 4 years ago
git clone https://github.com/gomods/athens
cd athens
$env:GO111MODULE="on"
$env:GOPROXY="https://proxy.golang.org"
$version = "0.2.0"
$date = "20200526"
go build -ldflags "-X github.com/gomods/athens/pkg/build.version=$version -X github.com/gomods/athens/pkg/build.buildDate=$date" -o athens ./cmd/proxy
From the document, https://docs.gomods.io/install/build-from-source/
I am using Windows Chinese version, and
(Get-Date).ToUniversalTime()
will get something like "2020年5月26日 8:50:26", which has space, so go build will fail.If I change the $date to "20200526", go build success