是否可以在app引擎上使用martini框架

Gre*_*ham 4 google-app-engine go

是否可以在Google的应用引擎上使用http://martini.codegangsta.io?有人有例子吗?在走这条路之前,我应该注意哪些问题?提前致谢.

nem*_*emo 6

只要马提尼不使用CGO或unsafesyscall包装应该罚款.马丁尼自述文件包含了一个使用马丁与GAE的例子,正如@elithar所指出的那样:

package hello

import (
  "net/http"
  "github.com/go-martini/martini"
)

func init() {
  m := martini.Classic()
  m.Get("/", func() string {
    return "Hello world!"
  })
  http.Handle("/", m)
}
Run Code Online (Sandbox Code Playgroud)

使用第三方软件包和app引擎的另一个例子是随机选择的应用程序引擎示例项目.