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,
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
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
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
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
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
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
-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
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
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
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
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
12 matches
Mail list logo