On Mon, Sep 10, 2012 at 12:35 PM, Sonia Hamilton
<
sonia.s...@gmail.com> wrote:
> % go run hello.go
> # command-line-arguments
> ./hello.go:6: undefined: goodbye
IIRC, try
$ go run hello.go goodbye.go
ie. name all the files of package main when using go run. If the files
are in $GOPATH, then you should be able to use also
$ go build # hello.go && goodby.go in current dir
or
$ go build foo/bar/hello # if the files are in $GOPATH/src/foo/bar/hello dir
Instead of 'build', 'install' is another option for non temporary
binaries. They get installed in $GOBIN (if not set then $GOROOT/bin, I
think).
HTH
-j