Pull request: 5035-slices-clone
Updates #5035. Squashed commit of the following: commit 9a5be90a347d4da08649927731b20fd5ecb90be2 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Oct 21 20:11:54 2022 +0300 all: use slices.Clone, netip.AddrPort
This commit is contained in:
@@ -13,8 +13,8 @@ import (
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/aghhttp"
|
||||
"github.com/AdguardTeam/golibs/errors"
|
||||
"github.com/AdguardTeam/golibs/log"
|
||||
"github.com/AdguardTeam/golibs/netutil"
|
||||
"github.com/miekg/dns"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
// LegacyRewrite is a single legacy DNS rewrite record.
|
||||
@@ -41,7 +41,7 @@ func (rw *LegacyRewrite) clone() (cloneRW *LegacyRewrite) {
|
||||
return &LegacyRewrite{
|
||||
Domain: rw.Domain,
|
||||
Answer: rw.Answer,
|
||||
IP: netutil.CloneIP(rw.IP),
|
||||
IP: slices.Clone(rw.IP),
|
||||
Type: rw.Type,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user