Problem with go get: module found but does not contain package

Hello! I am new to the discourse forum. Here’s my question:

Trying to get the schema for github.com/open-telemetry/opentelemetry-operator/apis/v1beta1

❯ go get github.com/open-telemetry/opentelemetry-operator/apis/v1beta1        
go: module github.com/open-telemetry/opentelemetry-operator@upgrade found (v1.51.0), but does not contain package github.com/open-telemetry/opentelemetry-operator/apis/v1beta1

I’m not sure what to search for to get around this error. I tried adding @v1.51.0 at the end of the import but still no luck.

How do I import this package?

Troubleshooting before asking question:

❯ go clean -cache
❯ go clean -modcache
❯ export GOPROXY=direct

But when I do the go get it simply hangs.

Ok I found the solution.

This particular package has a polluted version history. The REAL latest version is v0.99.0. Adding @v0.99.0 to the end of my go get solves the issue.