A
A
Alexey Verkhovtsev2021-04-06 19:54:08
go
Alexey Verkhovtsev, 2021-04-06 19:54:08

How to work with golang modules locally without uploading them to git servers?

Hello everyone, this is the question. I have a shared project folder, let's call it projectX, so as not to scatter the entire codebase around the computer. Next, in it, I create modules moduleA and ModuleB with my go.mod, as expected. How to locally, without downloading each module to your repo and then getting them via get, work and be able to call one from the other? goland does not see them point-blank for each other? You can, of course, upload them to the repo and work, but what if there is no Internet access? In general, how to do everything locally, and then, if desired, upload each module to the hub?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pavlyuk, 2021-04-06
@pav5000

For local work, you need to either keep everything in one module, just in different packages, or write replace directives in go.mod

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question