4 ms·
Ok, I wasn’t able to figure that out when I was in the codebase. What do you do if you’re working in a fork of the project and you need to make those changes?
by distortedsignal 3y ago
Ok, I wasn’t able to figure that out when I was in the codebase.
What do you do if you’re working in a fork of the project and you need to make those changes?
- Groxx 3y agoShould be the same. You can replace to any location, and with modules it doesn't even need to follow GOPATH naming conventions. E.g. clone A and fork-B into adjacent folders regardless of fork status or import paths, and change A/go.mod to include replace original.com/B ../B and that should work fine. With GOPATH you would need to clone the fork into the original path. Which you can do if needed / modules don't prevent that either, but modules don't need any specific locations at all. --- The official module doc is... huge and doesn't spell things out in an easily-usable form, so you're far from alone in your confusion, but I do think it's worth reading. I routinely find people spending way more time struggling with them than it would take to read the spec and become an expert on it: https://go.dev/ref/mod https://go.dev/ref/mod
- distortedsignal 3y agoWow. You’re right - that is simpler than I expected. Thank you!