当我使用 Goland 1.0 EAP IDE 调试结构源代码排序模块时,它可以调试并提示:
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
当我删除 server.go 和 util.go,并将代码移动到 main.go.It 工作。我认为可能是 GoLand 1.0 EAP BUG。