dsgrs26202 2017-11-09 03:10
浏览 596
已采纳

为什么goland 1.0 EAP提示“#command-line-arguments undefined:NewServer”

When I debug the fabric source code orderer module with Goland 1.0 EAP IDE, it could debug and tips that:

GOROOT=/usr/local/Cellar/go/1.8.3/libexec #gosetup
GOPATH=/Users/friends/Documents/VirtualMachine/share/gopath #gosetup
/usr/local/Cellar/go/1.8.3/libexec/bin/go build -i -o /private/var/folders/cg/mwzlhrjs5y55ny553g6xz9tr0000gn/T/___orderer_start -gcflags "-N -l" /Users/friends/Documents/VirtualMachine/share/gopath/src/github.com/hyperledger/fabric/orderer/main.go #gosetup

# command-line-arguments
orderer/main.go:76: undefined: NewServer
orderer/main.go:207: undefined: createLedgerFactory

the debug configurations is as following: enter image description here

in the fact ,NewServer exists in the server.go enter image description here

When I delete server.go and util.go, and move the code to main.go.It works. I think it may be GoLand 1.0 EAP BUG.

  • 写回答

1条回答 默认 最新

  • dongpin1850 2017-11-09 07:41
    关注

    In the Run Configuration screenshot, the Run Kind value is a File. That means GoLand will run that file only. Change it to Package and it change the package name option, which will now appear to point to the right package, in that case, github.com/hyperledger/fabric/orderer

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题