Hi

I have a monolithic source repository that is NOT in git, mercurial etc.

The directory structure is:

root
|
|--- mylib
|         | --- mylib.go
|         | --- go.mod
|--- svc1
|       | --- go.mod
|       | --- cmd
|                 | ---- svc1.go
|--- svc2
|       | --- go.mod
|       | --- cmd
|                 | ---- svc2.go

Here there is a `mylib` which is a common library. `svc1` and `svc2` are 
two golang http servers that come with their own `go.mod` files. Now I want 
to import the `mylib` in the `svc1` and `svc2` sources and the go.mod files.

Can someone tell me how to achieve this ? I can modify the go.mod of 
`mylib` to anything but cannot publish the sources to a VCS.

I tried adding the following in the go.mod files of svc1 and svc2 but it 
did not work.
replace (
my.lib latest => ../mylib latest
)

Any other suggestions to get this working ? Thanks.

-- 
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/3f4c0e55-d7c1-493a-b08b-dd2d05124447n%40googlegroups.com.

Reply via email to