strings package at app-engine different?

133 views
Skip to first unread message

josvazg

unread,
Jun 6, 2013, 10:40:07 AM6/6/13
to golan...@googlegroups.com
I was trying to use goweb (https://github.com/stretchrcom/goweb) on app-engine (1.1). I also have a go 1.1 installation.

I was surprised to get this error on the browser and terminal:

The Go application could not be built.
/home/jlvazquez/goprojects/src/github.com/stretchrcom/goweb/paths/path.go:74: undefined: "strings".TrimPrefix

Investigating, it seems that appengine's strings package is NOT the same as the normal go 1.1 strings package or the one on the web. For instance, TrimPrefix does NOT exist on appengine.

Why is this happening?

I believe that this is not a sandboxing question, the strings' function trimPrefix is quite a basic one to be "forbiden" (it does not make any sense to filter it out)

Any workarraound?

Jose

Georg Reinke

unread,
Jun 6, 2013, 11:15:41 AM6/6/13
to golan...@googlegroups.com
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

App Engine still runs Go 1.0 unless you select go1.1beta as the
api_version in app.yaml. strings.TrimPrefix was added with Go 1.1, so
it is not yet availabe.

josvazg

unread,
Jun 7, 2013, 2:36:31 AM6/7/13
to golan...@googlegroups.com
Thanks,

I suppose I cannot trick app engine into using my local go 1.1 instead of the one bundled within it. Can I?

Jose
Reply all
Reply to author
Forward
0 new messages