Is it possible to make a relative import in go code? I read a lot of examples but I really can't understand how to make it. For example, I have a project app
and a sub package utils
in it.
app
main.go
utils
utils.go
utils.go:
package utils
import "fmt"
func TestFunc() {
fmt.Print("I'm a TestFunc")
}
Is there a way to import this package using only import "./utils"
or import "app/utils
but not take all the path like import "github.com/hithubuser/app/utils"
?
If there is no way to do it, how do you work with the nested packages? Do you write a full the path for all the imports or you avoid to make it?