Hi Guys, have a golang module with multiple sub-modules, which i want to use "properly" in some other projects.
The issue is that the path is very long as that module is a part of a bigger project and it's inconvinient to repeat it everywhere over and over. Module path: github.com/slawomir-pryczek/HSServer/go/src/handler_socket2 https://github.com/slawomir-pryczek/HSServer/tree/master/go/src/handler_socket2 1. So the first idea was just to put handler_socket2 instead of the path inside go.mod. Everything was working correctly within the module, but it produced issue during import: "module declares its path as: handler_socket2 but was required as: github.com/slawomir-pryczek/HSServer/go/src/handler_socket2". Is it possible to get rid of this somehow? So if people will write some module and decide to publish it later they can just publish it without modifying half of their projects files? 2. The second idea was to declare the module with "proper" path, but replace handler_socket2 with ../handler_socket2 (link below). https://github.com/slawomir-pryczek/HSServer/blob/master/go/src/handler_socket2/go.mod Which again produces an error during import: go: github.com/slawomir-pryczek/HSServer/go/src/handler_socket2@v0.0.0-20220713073931-8de251cbe13e requires handler_socket2@v0.0.0: malformed module path "handler_socket2": missing dot in first path element So is there any way of not including self-referencing github URL over and over again if you just want to reference the sub-module of the module you're in? It's like writing a website and including local, absolute server paths for every image. Then if i want to fork a module or create v2 it'll get a different URL and i'll have to edit almost everything, which again will make the forked code to have to include unneeded changes vs the base. 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/b35f3aa1-1988-45da-a2b1-4551782780e0n%40googlegroups.com.