The only thing I’ve found that works is the latter… and then I go yelled at 
that I wasn’t using proper structure…

The only other choice is a different repo for the go code, and another repo for 
everything else.

It doesn’t seem workable to me for large multi-language projects… but no one 
seems to care…

The basic problem is that the imports in Go are absolute. They should be 
logical names, and then external config to point to where they are located… 
imagine now if a major project moved from github to some other internet repo…. 
mass chaos I think…

Sorry to say, but once again Java (especially with maven) has Go beat here.

> On Sep 27, 2018, at 6:40 PM, Ian Bruene <ianbru...@gmail.com> wrote:
> 
> 
> I am working on setting up NTPsec's build system to properly handle Go code, 
> and can only find limited information of the preferred way of structuring the 
> directory tree.
> 
> Forcing the entire project into GOPATH would be sloppy and a giant kluge all 
> around.
> 
> Placing the go code in a folder with no special structure (as we currently do 
> with Python), and then using relative module paths appears to work in 
> testing. However from what I gather relative module paths are a deeply 
> unkosher feature that should not be depended on.
> 
> The only other way I see is simply to replicate a GOPATH directory structure 
> within the project and have the build tools define a custom GOPATH. This 
> forces a somewhat clunky directory structure on the project with an otherwise 
> unneeded src/ directory. A possible workaround would be to structure the code 
> as with Python, then have the build system copy the files into a src/ 
> directory under build/ and run with that GOPATH.
> 
> 
> -- 
> 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 
> <mailto:golang-nuts+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to