Skip to content

Instantly share code, notes, and snippets.

@awreece
Created April 3, 2012 06:27
Show Gist options
  • Save awreece/2289761 to your computer and use it in GitHub Desktop.
Save awreece/2289761 to your computer and use it in GitHub Desktop.
Strange go build output
$ go build thingy
# thingy
src/thingy/main.go:6: imported and not used: "mypkg"
src/thingy/main.go:14: undefined: mypkg
$ find src
src/
src/thingy
src/thingy/thingy.go
src/mypkg
src/mypkg/mypkg.go
package main
import (
"flag"
"fmt"
"mypkg"
)
func main() {
flag.Parse()
fmt.Println("Hello")
mypkg.Out(1, "Foo")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment