Search code examples
gobeego

Can't find templatefile


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?


Solution

  • 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.