How to prevent go mod tidy from getting the last version of an indirect dependency?

23 Views Asked by At

After updating my project dependencies, I discovered a bug within a new version of an internal library used by my company. Other individuals informed me that they managed to resolve the issue by downgrading the corresponding indirect dependency to version 16:

go.opentelemetry.io/otel v1.17.0 // indirect

However, whenever I execute the go mod tidy command, the version automatically reverts to 1.17, and the bug persists.

Is there a way to prevent this behavior?

0

There are 0 best solutions below