Importing github.com/DataDog/datadog-go v5.0.0 from other package causes an error like:
go: github.com/DataDog/datadog-go/v5@v5.0.0: go.mod has non-.../v5 module path "github.com/DataDog/datadog-go" (and .../v5/go.mod does not exist) at revision v5.0.0
If the module is released at major version 2 or higher, the module path must end with a major version suffix like /v2. This may or may not be part of the subdirectory name. For example, the module with path golang.org/x/repo/sub/v2 could be in the /sub or /sub/v2 subdirectory of the repository golang.org/x/repo.
Importing github.com/DataDog/datadog-go v5.0.0 from other package causes an error like:
go: github.com/DataDog/datadog-go/v5@v5.0.0: go.mod has non-.../v5 module path "github.com/DataDog/datadog-go" (and .../v5/go.mod does not exist) at revision v5.0.0
Official document about module path: https://golang.org/ref/mod#module-path
The usual solution is to update the module path in
go.mod
frommodule github.com/DataDog/datadog-go
tomodule github.com/DataDog/datadog-go/v5
https://github.com/DataDog/datadog-go/blob/8eceabef48758063a04eed06f7ef3f04fe65d312/go.mod#L1