home: refactor more

This commit is contained in:
Ainar Garipov
2022-11-21 19:45:18 +03:00
parent a8850059db
commit f36efa26a4
4 changed files with 49 additions and 36 deletions

View File

@@ -22,7 +22,6 @@ import (
"github.com/AdguardTeam/golibs/stringutil"
"github.com/AdguardTeam/golibs/timeutil"
"github.com/ameshkov/dnscrypt/v2"
"golang.org/x/exp/slices"
)
// BlockingMode is an enum of all allowed blocking modes.
@@ -186,11 +185,6 @@ type TLSConfig struct {
hasIPAddrs bool
}
// CertDataClone returns a deep copy of certificate data.
func (c TLSConfig) CertDataClone() (certData, keyData []byte) {
return slices.Clone(c.CertificateChainData), slices.Clone(c.PrivateKeyData)
}
// DNSCryptConfig is the DNSCrypt server configuration struct.
type DNSCryptConfig struct {
ResolverCert *dnscrypt.Cert