When unit test, or build my code, I have to use the following command:
go test --tags nopkcs11
I am using https://github.com/alecthomas/gometalinter on windows for linting.
The gometalinter works well, but whenever I run linting, I can see a large number (hundreds) of messages like this:
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)
I run the metalinter in the following manner:
$ gometalinter.v1 ./...
Is there a way to disable pkcs11 on gometalinter?