How to import local packages in Golang + GAE?
anna:
app/
-app.yaml
-/my_app
--my_app.go
--/package1
---package1.go
我的提名:
package my_app
import (
"http"
"./package1"
)
func init() {
http.HandleFunc("/", package1.index)
}
列出包裹1.go:
package package1
import (
"http"
"fmt"
)
func index (w http.ResponseWriter, r * http.Request) {
fmt.Fprint(w, "I m index page =) ")
}
我有这样的错误:
/path/to/project/my_app/my_app.go:5: can t find import: ./package1
2011/11/03 10:50:51 go-app-builder: Failed building app: failed running 6g: exit status 1
得到帮助。