I'm trying to develop a simple golang package
let's say its name is "Hello", the directory structure is like below
hello
games
game-utils
then in hello.go (the main code) I have these:
import (
gameUtils "./game-utils"
"./games"
)
ok this worked well until I push to remote repo(e.g github.com) and try to use go get
to install it. The problem was with the import path, I must change it to
import (
gameUtils "github.com/user/hello/game-utils"
"github.com/user/hello/games"
)
the question is, everytime I develop the package I cannot import using "github.com/user/hello/game-utils"
because obviously I wouldn't have pushed it to the remote repo, I need to import it using "./game-utils"
.
Is there any elegant way to fix this issue?