找不到模板文件。

huangapple go评论186阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2017年7月11日 12:32:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/45025456.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定