On Wed, Oct 10, 2018, 5:49 AM D Whelp <dal.whelp...@gmail.com> wrote:

> Hello all,
>
> Super new to Golang, loving the hell out of it, but I am running into a
> small issue.  I have a small application that I am working through.  I can
> import my models using `import ("/dojo/pkg/models")` in main.go just fine.
> Now I am trying to build a `cli` package and I cannot import it.  Every
> time I do, I cannot use the function `QueryESXi()` that is in my esxi.go
> Attached is my layout.  I have tried "./cmd/cli" and "dojo/cmd/cli"... but
> none are working. What am I missing?  Thanks in advance.
>

There is a bit of missing info here. Assuming you are using a GOPATH like
$GOPATH/src/dojo or you have a go.mod properly configured and are outside
your GOPATH, then an import like "dojo/cmd/cli" could work. I would
recommend sticking to absolute import paths and not using relative dot
imports. What is the package name in your esxi.go file? The fact that it is
in a cmd location implies that it would be a "main" package and thus not
intended to be imported by another package.


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

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