Hi everyone on Golang group,

I'm having difficulty with some simple code, and appreciate if someone can 
point out a solution.

There is a simple main package that looks like this:

github.com/username/playground/
                                                            hello.go
                                                            main.go

hello.go:

package main
import "fmt"
func SayHello() {
  fmt.Println("Hello")
}

main.go

package main
func main() {
  SayHello()
}

Trying to run main.go is producing an error:

# command-line-arguments
go/src/github.com/username/playground/main.go:4:2: undefined: SayHello

Why is this error happening? Is my packaging done wrong?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/23ec2d08-cd13-4e5a-9b12-859cf40df19e%40googlegroups.com.

Reply via email to