Re: [go-nuts] confused with packages

2017-07-09 Thread Glenn Hancock
Nevermind, I figured it out. I was trying to do a go build test.go and should have been providing the path up to the folder and not including the name of the go file itself. ie: go build projectfolder/test . instead of go build test.go while inside the test folder. Thanks, Glenn On Sunda

Re: [go-nuts] confused with packages

2017-07-09 Thread Glenn Hancock
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 wit

Re: [go-nuts] confused with packages

2017-07-09 Thread Ian Lance Taylor
On Sun, Jul 9, 2017 at 6:28 PM, Glenn Hancock 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 atte

[go-nuts] confused with packages

2017-07-09 Thread Glenn Hancock
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