Sorry, I'm not quite following your question as I thought I answered it in 
my original post.

When I attempt a run or a build I get ./test.go:12: undefined: 
myfirstfunction

As I stated, I have 2 separate files, one called test.go and another called 
functions.go, both in same folder and both with package main.  Can't get 
any simpler than that as there is nothing to the program.  I am simply 
trying to learn the way go handles packages and how you call things from 
different packages.  I thought I had it all figured out but this is 
confusing me.

Thanks,

Glenn

On Sunday, July 9, 2017 at 10:06:07 PM UTC-4, Ian Lance Taylor wrote:
>
> On Sun, Jul 9, 2017 at 6:28 PM, Glenn Hancock <gle...@gmail.com 
> <javascript:>> wrote: 
> > 
> > I have setup a test program with the following files 
> > 
> > test folder with test.go and functions.go 
> > 
> > both files contain . package main 
> > 
> > function file has func in it called myfirstfunction() that just prints a 
> > line 
> > 
> > from main I attempt to call myfirstfunction() but get compiler error 
> saying 
> > it doesn't know anything about that function. 
> > 
> > I've checked to make sure I have everything spelled correct and I do. 
> > 
> > I attempted go run and it didn't work so I did a go build.  It did 
> compile 
> > and run once but now it won't at all. 
> > 
> > Any ideas? 
>
> What, precisely, did you do?  What, precisely, happened? 
>
> Ian 
>

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