Rmoeve unnecessary type convert (#134)

This commit is contained in:
ZhangJian He authored and GitHub committed 2022-01-05 11:15:26 +08:00
1 parent 8d486c3a20
commit 878e7fce3f
3 files changed
+6 -7

No files matched your search

+1 -2
View File
@@ -159,7 +159,6 @@ func LoadConfig(filename string) (*Config, error) {
return &config, nil
}
func (p *Plugins) UnmarshalJSON(b []byte) error {
var named NamedPlugins
err := json.Unmarshal(b, &named)
@@ -235,7 +234,7 @@ func NewTLSConfig(tlsInfo TLSInfo) (*tls.Config, error) {
return nil, err
}
pool := x509.NewCertPool()
ok := pool.AppendCertsFromPEM([]byte(rootPEM))
ok := pool.AppendCertsFromPEM(rootPEM)
if !ok {
return nil, fmt.Errorf("failed to parse root ca certificate")
}