On Sat, Jul 31, 2021 at 1:32 AM Jay Conrod <
jayc...@google.com> wrote:
>
> The go command only applies replace directives from the main module's go.mod file. In this example, replace directives in your module B would be applied, but replace directives in A (or any other dependency) would be ignored. This is important for avoiding conflicts that can't easily be resolved (for example, you depend on X and Y, and they both depend on incompatible forked versions of Z).
>
> The command 'go list -m -json $modulepath' shows information about any module you depend on. In the output, the Replace field will be set if the module is replaced.
Thanks for clearing my confusion as well as the pointer to go list for
showing the data i am looking for.
For someone else looking for the exact command: go list -m -f
'{{.Path}} => {{.Replace}}' is one way to verify this.