Created
April 3, 2012 06:27
-
-
Save awreece/2289761 to your computer and use it in GitHub Desktop.
Strange go build output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ go build thingy | |
# thingy | |
src/thingy/main.go:6: imported and not used: "mypkg" | |
src/thingy/main.go:14: undefined: mypkg | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ find src | |
src/ | |
src/thingy | |
src/thingy/thingy.go | |
src/mypkg | |
src/mypkg/mypkg.go |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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