I’m attempting to use a fork of the module https://github.com/btcsuite/btcd/tree/master/btcutil
To override the dependency, I used the following:
$ go mod edit -replace github.com/btcsuite/btcd/[email protected]=github.com/MarcoEzekiel/btcd/[email protected]
My go.mod file includes the following:
require (
github.com/btcsuite/btcd/btcutil v1.1.5
)
replace github.com/btcsuite/btcd/btcutil v1.1.5 => github.com/MarcoEzekiel/btcd/btcutil v1.1.6
However, something about the parser for the replace
directive appears to consider the btcutil
part of the path as part of the version, rather than part of the module name.
$ go mod tidy
go: downloading github.com/MarcoEzekiel/btcd/btcutil v1.1.6
go: github.com/MarcoEzekiel/zcashparsers/GO/zcashparsers/internal/unifiedAddress imports
github.com/btcsuite/btcd/btcutil/bech32: reading github.com/MarcoEzekiel/btcd/btcutil/go.mod at revision btcutil/v1.1.6: unknown revision btcutil/v1.1.6
go: github.com/MarcoEzekiel/zcashparsers/GO/zcashparsers/internal/zcashparser imports
github.com/btcsuite/btcd/btcutil/base58: reading github.com/MarcoEzekiel/btcd/btcutil/go.mod at revision btcutil/v1.1.6: unknown revision btcutil/v1.1.6
What is the correct way to use a replace
directive for a module that is not located at the repository root?