Revel:-X标志需要importpath.name = value形式的参数

时间:2016-06-14 11:16:26

标签: go revel

我在开发模式下运行revel app时遇到以下错误。我发布了以下日志

INFO  2016/06/14 16:18:17 build.go:172: Cleaning dir tmp
INFO  2016/06/14 16:18:17 build.go:172: Cleaning dir routes
2016/06/14 16:18:17 reflect.go:728: Failed to generate name for field. Make sure the field name is valid.
2016/06/14 16:18:17 reflect.go:728: Failed to generate name for field. Make sure the field name is valid.
2016/06/14 16:18:17 reflect.go:728: Failed to generate name for field. Make sure the field name is valid.
INFO  2016/06/14 16:18:17 build.go:172: Cleaning dir tmp
INFO  2016/06/14 16:18:17 build.go:172: Cleaning dir routes
ERROR 2016/06/14 16:18:19 build.go:101: # gocars-api-core/app/tmp
/home/deploy/.gvm/gos/go1.6/pkg/tool/linux_amd64/link: -X flag requires argument of the form importpath.name=value

ERROR 2016/06/14 16:18:19 build.go:298: Failed to parse build errors:
 # gocars-api-core/app/tmp
/home/deploy/.gvm/gos/go1.6/pkg/tool/linux_amd64/link: -X flag requires argument of the form importpath.name=value

此外,在运行revel构建时,我收到以下错误

deploy@ip-172-xx-xx-x9 ~/gocars $ revel build gocars-api-core ./buiding1
~
~ revel! http://revel.github.io
~
INFO  2016/06/15 15:52:51 revel.go:365: Loaded module static
INFO  2016/06/15 15:52:51 revel.go:230: Initialized Revel v0.13.1 (2016-06-06) for >= go1.4
INFO  2016/06/15 15:52:51 build.go:172: Cleaning dir tmp
INFO  2016/06/15 15:52:51 build.go:172: Cleaning dir routes
2016/06/15 15:52:51 reflect.go:728: Failed to generate name for field. Make sure the field name is valid.
2016/06/15 15:52:51 reflect.go:728: Failed to generate name for field. Make sure the field name is valid.
2016/06/15 15:52:51 reflect.go:728: Failed to generate name for field. Make sure the field name is valid.
INFO  2016/06/15 15:52:51 build.go:172: Cleaning dir tmp
INFO  2016/06/15 15:52:51 build.go:172: Cleaning dir routes
TRACE 2016/06/15 15:52:51 build.go:94: Exec: [/home/deploy/.gvm/gos/go1.6/bin/go build -ldflags -X gocars-api-core/app.APP_VERSION "" -tags  -o /home/deploy/gocars/bin/revel.d/gocars-api-core/gocars-api-core gocars-api-core/app/tmp]
ERROR 2016/06/15 15:52:54 build.go:101: # gocars-api-core/app/tmp
/home/deploy/.gvm/gos/go1.6/pkg/tool/linux_amd64/link: -X flag requires argument of the form importpath.name=value

ERROR 2016/06/15 15:52:54 build.go:298: Failed to parse build errors:
 # gocars-api-core/app/tmp
/home/deploy/.gvm/gos/go1.6/pkg/tool/linux_amd64/link: -X flag requires argument of the form importpath.name=value

我是新手,并且不确定为什么会出现这个编译错误?

0 个答案:

没有答案