Re: [go-nuts] Re: GO Mod (modules) for dummies. Please help.

2019-10-25 Thread Robert Engels
Don’t be frustrated. The design could be better imo. I am assuming much of the complexity comes from trying to optimize the build across projects that share common modules. I think there are easier ways to accomplish this. Simple mappings to version labels would be easier imo. > On Oct 25,

[go-nuts] Re: GO Mod (modules) for dummies. Please help.

2019-10-25 Thread Stuart Davies
Well I can see that I am not getting this. I will carry on coding and see if the understanding I have resolves itself. Thanks for all you contributions. On Monday, 23 September 2019 16:25:30 UTC+1, Stuart Davies wrote: > > Hi. > > > I have been using GO for about a year and I love the language

[go-nuts] Re: GO Mod (modules) for dummies. Please help.

2019-10-24 Thread Volker Dobler
Hi I think one of the main struggles stems from "dependency" having two technical meanings: a) If a package a imports a package b then a depends on b. This is a priori agnostic to versions. This type of dependency is expressed by a simple import "import/path/of/b" in a's source

[go-nuts] Re: GO Mod (modules) for dummies. Please help.

2019-10-23 Thread Stuart Davies
Hi thepudds Thanks for the reply. Somtimes I think I have it and somtimes I most definitly do not. I have been developing code for some time now, mostly in Java. I have used Mavan and Gradle and both give me issues with 'dependency hell'. I prefer Maven over Gradle any day because you can see

[go-nuts] Re: GO Mod (modules) for dummies. Please help.

2019-10-22 Thread t hepudds
Hello Stuart, I haven't digested everything here, but one comment is that all of the directives in go.mod like 'require' and 'replace' all deal with module paths, and not package import paths. This 'replace' I think does nothing: replace github.com/mygit/webserverbase/config v0.1.0-alpha

[go-nuts] Re: GO Mod (modules) for dummies. Please help.

2019-10-22 Thread Stuart Davies
Cannot make local changes. Dispite previous comments This is still a frustrating issue! I have the following project structure: ── webserverbase ├── config │ ├── config.go ├── example │ ├── go.mod // Mod file 1 │ ├── go.sum │ ├── webserver.go ├── exec

[go-nuts] Re: GO Mod (modules) for dummies. Please help.

2019-10-19 Thread Stuart Davies
OK I think I have cracked it! I needed a *go.mod* file in the root path. module github.com/mygit/webserver go 1.13 This basically means that the *go.mod* file in examples can find a *go.mod* file at ../ replace github.com/mygit/webserver => ../ The clue was in the error message from

[go-nuts] Re: GO Mod (modules) for dummies. Please help.

2019-10-19 Thread Stuart Davies
-K Thanks for the comments. I am thinking I should separate the example from the modules and they should both have go.mod files. I have to say that up until now I was 100% focused on go but I have spend the last couple of days focused on modules and it is very frustrating. I will see what

[go-nuts] Re: GO Mod (modules) for dummies. Please help.

2019-10-19 Thread kddavidson722
Hi Stuart, (I'm not 100% confident, so take this with a grain of salt ;) ) In my experience, I have always found it best to have go.mod in the project's root directory (as well as only using one go.mod per repo). You could also use go mod vendor command, which will download all of the

[go-nuts] Re: GO Mod (modules) for dummies. Please help.

2019-10-18 Thread Stuart Davies
Thanks but I had alread seen your post. But I cannot get the replace to work. I have given more detail below: Project layout: ── webserver ├── config │ ├── config.go ├── example │ ├── go.mod │ ├── go.sum │ ├── webserver.go ├── exec │ ├── exec.go

[go-nuts] Re: GO Mod (modules) for dummies. Please help.

2019-10-18 Thread Stuart Davies
I am having real issues understanding what is going wrong. When my project was self contained I thought I understood. Now I am trying to package it up I am in trouble. I had a project layout as follows (simplified) webserver/config/config.go webserver/template/template.go

[go-nuts] Re: GO Mod (modules) for dummies. Please help.

2019-10-18 Thread Stuart Davies
I am having real issues understanding what is going wrong. When my project was self contained I thought I understood. Now I am trying to package it up I am in trouble. I had a project layout as follows (simplified) webserver/config/config.go webserver/template/template.go