Yes, my GOPATH and GOROOT are working fine in fact other local imports work 
as intended.  I made a idiotic mistake and wasted so much time googling 
when I shouldve seen what I was doing wrong.  I was calling `QueryESXi()` 
and adding the import line.  I left off the `cli.QueryESXi()`.  Once I did 
that importing `dojo/cmd/cli` worked like a champ.  Thank you so much for 
reaching out!

On Tuesday, October 9, 2018 at 1:23:22 PM UTC-5, Justin Israel wrote:
>
>
>
> On Wed, Oct 10, 2018, 5:49 AM D Whelp <dal.wh...@gmail.com <javascript:>> 
> 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...@googlegroups.com <javascript:>.
>> 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