-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
Description
by wyshunter:
Before filing a bug, please check whether it has been fixed since the latest release. Search the issue tracker and check that you're running the latest version of Go: Run "go version" and compare against http://golang.org/doc/devel/release.html If a newer version of Go exists, install it and retry what you did to reproduce the problem. Thanks. What steps will reproduce the problem? $GOPATH/src/mysite/abc.go package main import "mysite/handler" func main() { a := mysite.Handler println(a) } --------------- $GOPATH/src/mysite/handler/handler.go package mysite func Handler(.......... //None code After when I go run abc.go, it works! $ go run abc.go 0x6a4578 I think handler.go should make error because it is placed in handler dir, but 1st line is package mysite But when I changer abc.go : import "mysite/handler" to import "mysite", it report error $ go run abc.go abc.go:3:8: import cycle not allowed I feel confused....... What is the expected output? some compile error What do you see instead? Which compiler are you using (5g, 6g, 8g, gccgo)? 6g Which operating system are you using? 2.6.32-220.23.2 Which version are you using? (run 'go version') go version go1.2 linux/amd64 Please provide any additional information below.