当单元测试或构建我的代码时,我必须使用以下命令:
go test --tags nopkcs11
我正在使用https://github.com/alecthomas/gometalinter在windows上做衬布。
金门机工作得很好,但每当我跑起来时,我就能看到这样的大量(数百条)信息:
c:\Users\xxxxxxxxx\workspace\go\src\github.com\hyperledger\fabric\bccsp\pkcs11\impl.go:70:24:warning: SessionHandle not declared by package pkcs11 (staticcheck) c:\Users\xxxxxxxxx\workspace\go\src\github.com\hyperledger\fabric\bccsp\pkcs11\impl.go:70:24:warning: SessionHandle not declared by package pkcs11 (staticcheck) c:\Users\xxxxxxxxx\workspace\go\src\github.com\hyperledger\fabric\bccsp\pkcs11\pkcs11.go:39:9:warning: New not declared by package pkcs11 (staticcheck) c:\Users\xxxxxxxxx\workspace\go\src\github.com\hyperledger\fabric\bccsp\pkcs11\pkcs11.go:50:20:warning: cannot range over slots (invalid operand) (staticcheck)
我以下列方式运行金属件:
$ gometalinter.v1 ./...
有什么方法可以使pkcs11失效吗?
发布于 2017-11-08 14:25:34
这有点像黑客+ windows用户必须有一个unix终端:
gometalinter.v1 ./... --deadline 10000000ms | awk '!/pkcs11/'发布于 2017-11-08 15:37:50
根据配置文件文档,您似乎可以在项目中使用一个gometalinter。您可以使用Exclude设置来设置正则表达式,如果消息与模式匹配,则不会输出消息。
https://stackoverflow.com/questions/47181674
复制相似问题