为了账号安全,请及时绑定邮箱和手机立即绑定

go test -v 有问题, 系统为Mac OS 10.14 go1.13.8

$ go test -v

# crypto/x509

/usr/local/go/src/crypto/x509/root_cgo_darwin.go:29:48: error: use of undeclared identifier 'kSecPolicyOid'

        if (CFDictionaryGetValueIfPresent(properties, kSecPolicyOid, (const void **)&value)) {

                                                      ^

/usr/local/go/src/crypto/x509/root_cgo_darwin.go:30:26: error: use of undeclared identifier 'kSecPolicyAppleSSL'; did you mean 'SecPolicyCreateSSL'?

                isSSL = CFEqual(value, kSecPolicyAppleSSL);

                                       ^~~~~~~~~~~~~~~~~~

                                       SecPolicyCreateSSL

/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h:103:14: note: 'SecPolicyCreateSSL' declared here

SecPolicyRef SecPolicyCreateSSL(Boolean server, CFStringRef hostname);

             ^

2 errors generated.

FAIL    github.com/xxxx/shorturl [build failed]


正在回答

1 回答

这是系统对应的版本不同引起的

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

go test -v 有问题, 系统为Mac OS 10.14 go1.13.8

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信