0

我的 Go 项目出现以下错误。我go mod用来管理依赖项。看起来最新版本的opentelemetry不特定软件包。但是我应该如何修复它们

go get ./...                           
go: finding module for package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/trace/v1
go: finding module for package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/metrics/v1
go: finding module for package go.opentelemetry.io/otel/api/label
go: finding module for package go.opentelemetry.io/otel/api/standard
go: finding module for package go.opentelemetry.io/otel/instrumentation/othttp
go: finding module for package go.opentelemetry.io/otel/api/kv
go: finding module for package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/trace/v1
go: finding module for package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1
go: finding module for package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/resource/v1
go: finding module for package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/metrics/v1
go: finding module for package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/trace/v1
go: finding module for package go.opentelemetry.io/otel/api/kv
go: finding module for package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/metrics/v1
go: finding module for package go.opentelemetry.io/otel/api/standard
go: finding module for package go.opentelemetry.io/otel/instrumentation/othttp
go: finding module for package go.opentelemetry.io/otel/api/label
go: finding module for package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/metrics/v1
go: finding module for package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/resource/v1
go: finding module for package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1
go: finding module for package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/trace/v1
pkg/tracing/opentelemetry.go:10:2: module go.opentelemetry.io/otel@latest found (v0.13.0), but does not contain package go.opentelemetry.io/otel/api/kv
../go/pkg/mod/go.opentelemetry.io/otel/exporters/otlp@v0.10.0/internal/transform/metric.go:30:2: module go.opentelemetry.io/otel@latest found (v0.13.0), but does not contain package go.opentelemetry.io/otel/api/label
pkg/tracing/opentelemetry.go:12:2: module go.opentelemetry.io/otel@latest found (v0.13.0), but does not contain package go.opentelemetry.io/otel/api/standard
../go/pkg/mod/go.opentelemetry.io/otel/exporters/otlp@v0.10.0/otlp.go:28:2: module go.opentelemetry.io/otel@latest found (v0.13.0), but does not contain package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/metrics/v1
../go/pkg/mod/go.opentelemetry.io/otel/exporters/otlp@v0.10.0/otlp.go:29:2: module go.opentelemetry.io/otel@latest found (v0.13.0), but does not contain package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/collector/trace/v1
../go/pkg/mod/go.opentelemetry.io/otel/exporters/otlp@v0.10.0/internal/transform/attribute.go:18:2: module go.opentelemetry.io/otel@latest found (v0.13.0), but does not contain package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/common/v1
../go/pkg/mod/go.opentelemetry.io/otel/exporters/otlp@v0.10.0/internal/transform/metric.go:27:2: module go.opentelemetry.io/otel@latest found (v0.13.0), but does not contain package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/metrics/v1
../go/pkg/mod/go.opentelemetry.io/otel/exporters/otlp@v0.10.0/internal/transform/metric.go:28:2: module go.opentelemetry.io/otel@latest found (v0.13.0), but does not contain package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/resource/v1
../go/pkg/mod/go.opentelemetry.io/otel/exporters/otlp@v0.10.0/internal/transform/span.go:20:2: module go.opentelemetry.io/otel@latest found (v0.13.0), but does not contain package go.opentelemetry.io/otel/internal/opentelemetry-proto-gen/trace/v1
pkg/home/net/http/fw_handlers.go:11:2: module go.opentelemetry.io/otel@latest found (v0.13.0), but does not contain package go.opentelemetry.io/otel/instrumentation/othttp
4

1 回答 1

0

我遇到了类似的问题,彻底清理缓存就可以了。同样,我相信这会从您的系统中删除所有软件包,因此请谨慎使用:

go clean -cache -modcache -i -r
于 2020-12-14T19:51:37.150 回答