英文:
Can't find templatefile
问题
我在IdeaProject中有一个beego项目。结构如下:
MathApp
├── conf
│ └── app.conf
├── main.go
├── main_test.go
└── views
├── invalid-route.html
└── result.html
然而,它显示错误can't find templatefile in the path:views/result.html。我已将gopath设置为C:/gopath。
有什么建议吗?
英文:
I have a beego project in IdeaProject. The structure is like this:
MathApp
├── conf
│ └── app.conf
├── main.go
├── main_test.go
└── views
├── invalid-route.html
└── result.html
However, it shows the error can't find templatefile in the path:views/result.html. I have set the gopath as C:/gopath.
Any suggestion?
答案1
得分: 1
你可以在template.go中看到产生此错误的代码。
这个问题提到:
> 请使用bee run,因为go get将二进制文件安装到gopath/bin中,而静态文件仍在gopath/src/myproject中。
英文:
You can see the code producing this error in template.go
This issue mentions:
> Please use the bee run, as go get install the binary into the gopath/bin, while the static file still in the gopath/src/myproject.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论