Echo: [URGENT] Echo GAE problems

Created on 16 Jan 2017  路  10Comments  路  Source: labstack/echo

Description

Echo dependency, github.com/valyala/fasttemplate throws an error on goapp serve.

Checklist

  • [x] Dependencies installed
  • [x] No typos
  • [x] Searched existing issues and docs

Expected behaviour

Successfully build my application.

Actual behaviour

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

Steps to reproduce

Try serving application using echo on Google App Engine.

Working code to debug

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()
}

Version/commit

v3.0.3

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.

All 10 comments

Having the same issue @vishr

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

absinsekt picture absinsekt  路  4Comments

linux-support picture linux-support  路  3Comments

leoycx picture leoycx  路  4Comments

mmindenhall picture mmindenhall  路  4Comments

younisshah picture younisshah  路  4Comments