Thanks Micheal, i will read those articles. But won't it be very cumbersome to have to edit the go.mod file all the time? It seems like it would break the flow.
On Sun, 7 Jun 2020 at 15:31, Michael Stiller <m...@2scale.net> wrote: > Hi, > > if the you want to use is on the local system you can add something like > this to the go.mod file: > > replace github.com/yourrepo/module => ../pkg/module > > See also here: > > > https://thewebivore.com/using-replace-in-go-mod-to-point-to-your-local-module/ > > and here: > > https://starkandwayne.com/blog/switching-to-go-modules/ > > Best regards, > > Michael > > > > On 7. Jun 2020, at 15:20, Erwin Driessens <snesse...@gmail.com> wrote: > > > > Hello people > > i have always found modules very scary and complicated but now there > seems to be no way round any longer. > > I have a lot of packages that i do now want to put in repositories. I > want them to be locally accessible, without internet access. > > Everything always worked great for me with the old GOPATH setup. > > Yesterday i installed go 1.14 on a new machine, and thought, ok lets try > the modules. I followed "How to write Go code" ( > https://golang.org/doc/code.html) and was happy to read the following: > > " > > Note that you don't need to publish your code to a remote repository > before you can build it. A module can be defined locally without belonging > to a repository. However, it's a good habit to organize your code as if you > will publish it someday. > > " > > I did indeed get the hello module to work well. > > > > However, my next quest was to import the hello/morestrings package in > another module and use it there. I can get it to work :( > > Does anyone know of a good document/wiki/tutorial about developing go > code that is not on remote repositories? Go was great but now i feel > totally handicapped... > > > > > > > > > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "golang-nuts" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to golang-nuts+unsubscr...@googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/186c785e-f328-439b-a8e5-87f6f0faba90o%40googlegroups.com > . > > -- > 2scale GmbH, Schanzenstr. 20, 40549 Düsseldorf > Amtsgericht: Düsseldorf HRB 50718 > Geschäftsführer: Georg von Zezschwitz, Dirk Vleugels > USt-IdNr.: DE 210936505 > > > > > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CA%2BJLj4xQTAY_1%3DQL3aCbus9hC4U_WGeWP5HPvteMHS1YoywSxg%40mail.gmail.com.