当我运行go vet以下错误输出:
client.go:2345: assignment copies lock value to tr: net/http.Transport contains sync.Mutex
exit status 1
Run Code Online (Sandbox Code Playgroud)
client.go:2345:
var tr http.Transport
// Setup TLS
if clientConfig.TLSEnabled {
tr = http.Transport{ // This is line 2345
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
MinVersion: tls.VersionTLS11,
},
}
}
Run Code Online (Sandbox Code Playgroud)
如何解决此警告?它并没有停止我的构建;但是,这是警告,我也不想警告。