1 .问题
运行该命令 E:\CodeResearch\go\MyGo\3rdparty\bin>revel.exe run ..\..\demo\revel\myapp 出现问题以下的错误信息:
~ revel! http://robfig.github.com/revel
INFO 2013/05/11 22:36:13 revel.go:252: Loaded module E:\CodeResearch\go\MyGo\3rdparty\src\github.com\robfig\revel\modules\testrunnerINFO 2013/05/11 22:36:13 revel.go:252: Loaded module E:\CodeResearch\go\MyGo\3rdparty\src\github.com\robfig\revel\modules\staticINFO 2013/05/11 22:36:13 run.go:57: Running myapp (..\..\demo\revel\myapp) in dev modeINFO 2013/05/11 22:36:13 harness.go:143: Listening on :90002013/05/11 22:36:18 server.go:590: http: panic serving 127.0.0.1:62012: runtime error: slice bounds out of rangeC:/Users/ADMINI~1/AppData/Local/Temp/2/bindist721200707/go/src/pkg/net/http/server.go:589 (0x4aadbc)C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist721200707/go/src/pkg/runtime/proc.c:1443 (0x4150ee)C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist721200707/go/src/pkg/runtime/runtime.c:128 (0x415b0c)C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist721200707/go/src/pkg/runtime/runtime.c:91 (0x4159ed)C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist721200707/go/src/pkg/runtime/zstring_386.c:269 (0x41c047)E:/CodeResearch/go/MyGo/3rdparty/src/github.com/robfig/revel/harness/reflect.go:111 (0x451a2d) com/robfig/revel/harness._func_004: pkgImportPath = rootImportPath + "/" + filepath.ToSlash(path[len(root)+1:])C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist721200707/go/src/pkg/path/filepath/path.go:305 (0x45d038)
2. 我的解决
我的GOPATH=E:\CodeResearch\go\MyGo\3rdparty\,说明PATH路径没有问题,根据错误信息是对..\..\demo\revel\myapp路径的解析出现了问题。我将myapp拷贝到3rdparty\路径下,运行成功。