#67961 closed defect (fixed)

Go fails to fetch modules due to empty GOPROXY env var

Reported by: herbygillot (Herby Gillot) Owned by: herbygillot (Herby Gillot)
Priority: High Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: go

Description

This is observed with Go 1.21.0; Go is failing to fetch modules due to GOPROXY not being set.

$ go get golang.org/x/exp/rand
go: golang.org/x/exp/rand: GOPROXY list is not the empty string, but contains no entries

Also covered in comments here: https://github.com/macports/macports-ports/pull/19815#issuecomment-1678107325

It looks that Go now includes a go.env file which sets GOPROXY to expected defaults, along with a few other environment variables.

Change History (1)

comment:1 Changed 15 months ago by herbygillot (Herby Gillot)

Resolution: fixed
Status: assignedclosed

In f7f627727bfa69352900358d85bafca9f1705ad5/macports-ports (master):

go: install go.env if present

Fixes: #67961

Note: See TracTickets for help on using tickets.