Echo dependency, github.com/valyala/fasttemplate throws an error on goapp serve.
Successfully build my application.
Throws this error:
2017/01/16 14:06:30 go-app-builder: Failed parsing input: parser: bad import "unsafe" in github.com/valyala/fasttemplate/template.go from GOPATH
Try serving application using echo on Google App Engine.
package main
import (
"net/http"
"github.com/labstack/echo"
"google.golang.org/appengine"
)
func createMux() *echo.Echo {
e := echo.New()
return e
}
func main() {
e := echo.New(":8080")
http.Handle("/", e)
appengine.Main()
}
v3.0.3
Having the same issue @vishr
For now, you can use this version of the library https://github.com/valyala/fasttemplate/tree/3b874956e03f1636d171bda64b130f9135f42cff.
Please open an issue here https://github.com/valyala/fasttemplate
Issue opened : https://github.com/valyala/fasttemplate/issues/3
As far as I understand, @valyala refactored its code to use unsafe for performance reason.
I raised a PR https://github.com/valyala/fasttemplate/pull/4/files please verify if that works. I don't have a GAE env.
~At least, it builds :)~
Nope :/
I will try to improve your solution on my env.
I think you just forgot the return on unsafeString2Bytes.
With the return, it seems to work.
ok, I just fixed that.
Thanks for the temporary fix @vishr. This version of fasttemplate works like a charm.
I've got similar problem but with go-colorable:
go-app-builder: Failed parsing input: parser: bad import "syscall" in github.com\mattn\go-colorable\colorable_windows.go from GOPATH
@vishr This PR is merged.
https://github.com/valyala/fasttemplate/pull/4/files
I use Google Cloud SDK 145.0.0 (2017-02-22).
No problem.
Please close this issue.
Most helpful comment
I raised a PR https://github.com/valyala/fasttemplate/pull/4/files please verify if that works. I don't have a GAE env.