Hello All,

I'm writing my first Go program, it is on GitHub monimelt 
<https://github.com/bstarynk/monimelt/>  and I'm specifically talking of 
the commit 15a7fbc61e141d62655 
<https://github.com/bstarynk/monimelt/commit/15a7fbc61e141d626554be7ec3de612c5df2885c>
 
(master branch). See this question 
<https://groups.google.com/d/msg/golang-nuts/LWAJF0mapkI/C1P2ond_EAAJ> for 
more details and motivations. So I am not very familiar with Go. I'm using 
Go 1.8 on Debian/Linux/x86-64

I understood it is better to have each package in its own directory (that 
directory would often contain one or more *.go files implementing the 
package, and probably one or more *_test.go tests; I don't mention the 
tests files here....). 

So I have a package serialmo mostly in file 
<https://github.com/bstarynk/monimelt/blob/master/serial/serialmo.go>
serial/serialmo.go 
<https://github.com/bstarynk/monimelt/blob/master/serial/serialmo.go> and 
that package (from my point of view, a "leaf" package) only depends on 
standard Go packages (like  "crypto/rand", "fmt" etc...)

I also have a package objvalmo mostly in file objval/objvalmo.go 
<https://github.com/bstarynk/monimelt/blob/master/objval/objvalmo.go> and 
that package depends on the previous serialmo.

However, I had to code there


package objvalmo
import (
    "fmt"
    serialmo "github.com/bstarynk/monimelt/serial"
    "runtime"
    "sync"
    "unsafe"
)















and I find very inconvenient to have to mention the path 
"github.com/bstarynk/monimelt/serial" in the source code, notably because 
if someone wants to fork my github project, he would have change my 
username bstarynk/ by his own one in every package path like 
"github.com/bstarynk/monimelt/serial"

I tried (and I would prefer) to code 
   serialmo "../serial"
but that does not work.

I'm certainly doing things very wrong. What did I missed? I'm using the go 
tool to compile stuff.

Thanks for reading and for your help. Regards.

Basile Starynkevitch (France)  http://starynkevitch.net/Basile/ 


-- 
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