And I can do go mod download for for the required packages but when I try to execute:
go get golang.org/x/exp/contstraints
which should work but I get an error:
go: golang.org/x/exp/contstraints: no matching versions for query "upgrade"
I also tried downloading different commits:
go get golang.org/x/exp/contstraints@2b6e20a6d8b6a7fa47ce7f245c422b7abb361048
but I get a variety of different errors from:
golang.org/x/exp/contstraints@v0.0.0-20250506013429-2b6e20a6d8b6: invalid version: missing golang.org/x/exp/contstraints/go.mod at revision 2b6e20a6d8b6
to
go: module golang.org/x/exp@2b6e20a6d8b6a7fa47ce7f245c422b7abb361048 found (v0.0.0-20250506013429-2b6e20a6d8b6), but does not contain package golang.org/x/exp/contstraints
I realize this is experimental code and does not have any compatibility guarantee I’m more curious if I’m doing something wrong and whether or not I should be able to do this. I’m running go 1.24.2:
go: golang.org/x/exp/constraints: no matching versions for query "upgrade"
or when I add the tag I get:
go: golang.org/x/constraints@latest: unrecognized import path "golang.org/x/constraints": reading https://golang.org/x/constraints?go-get=1: 404 Not Found
server response: 404 page not found
I even tried the version approach and get the same answer
dan@workstation-DBDGVD3:~/Class/002-Learning_Go-Take2/023-Generics/186-Package_constraints$ go get golang.org/x/constraints@v0.0.0-20250506013437-ce4c2cf36ca6
go: golang.org/x/constraints@v0.0.0-20250506013437-ce4c2cf36ca6: unrecognized import path "golang.org/x/constraints": reading https://golang.org/x/constraints?go-get=1: 404 Not Found
server response: 404 page not found