上下文:https : //github.com/fusspawn/tserver/blob/master/app/controllers/gorp.go
作为尝试进行 gorm 设置的一部分,我尝试转换标准 revel/gorp 示例。
然而。即使定义了 Begin()、Commit()、Rollback() 方法也足以引起恐慌。
TRACE 2015/09/06 17:37:47 harness.go:126: Rebuild
INFO 2015/09/06 17:37:47 build.go:172: Cleaning dir tmp
INFO 2015/09/06 17:37:47 build.go:172: Cleaning dir routes
INFO 2015/09/06 17:37:47 build.go:172: Cleaning dir tmp
INFO 2015/09/06 17:37:47 build.go:172: Cleaning dir routes
TRACE 2015/09/06 17:37:47 build.go:151: Exec: [/usr/bin/git --git- dir=/home/fusspawn/go/src/github.com/fusspawn/tserver/.git describe --always -- dirty]
TRACE 2015/09/06 17:37:47 build.go:94: Exec: [/usr/bin/go build -ldflags -X github.com/fusspawn/tserver/app.APP_VERSION "git-2588ef1" -tags -o /ho
me/fusspawn/go/bin/revel.d/github.com/fusspawn/tserver/tserver github.com/fusspawn/tserver/app/tmp]
TRACE 2015/09/06 17:39:14 app.go:56: Exec app: /home/fusspawn/go/bin/revel.d/github.com/fusspawn/tserver/tserver [/home/fusspawn/go/bin/revel.d/git
hub.com/fusspawn/tserver/tserver -port=46276 - importPath=github.com/fusspawn/tserver -runMode=dev]
注释掉方法定义将停止恐慌。我似乎无法理解如何不调用这些方法(注意 revel.InterceptMethod 调用被注释掉)会使恐慌发生:/
富国沪深
相关分类