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

Why goland 1.0 EAP tips "#command-line-arguments undefined: NewServer"

当我使用 Goland 1.0 EAP IDE 调试 fabric 源代码排序器模块时,它可以调试并提示:

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

调试配置如下:

事实上,NewServer 存在于 server.go

当我删除 server.go 和 util.go 并将代码移至 main.go.It 时,工作正常。我觉得可能是GoLand 1.0 EAP BUG。

在 运行 配置屏幕截图中,运行 Kind 值是一个文件。这意味着 GoLand 将仅 运行 该文件。将其更改为 Package 并更改包名称选项,该选项现在似乎指向正确的包,在这种情况下,github.com/hyperledger/fabric/orderer