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

Jim*_*een 3 intellij-idea go delve hyperledger-fabric goland

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

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
Run Code Online (Sandbox Code Playgroud)

调试配置如下: 在此处输入图片说明

事实上,NewServer 存在于 server.go 中 在此处输入图片说明

当我删除 server.go 和 util.go,并将代码移动到 main.go.It 工作。我认为可能是 GoLand 1.0 EAP BUG。

dls*_*per 5

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