mirror of
https://github.com/tailscale/tailscale.git
synced 2025-05-07 08:07:16 +00:00
wgengine/filter: remove unused Clone methods.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
b3634f020d
commit
a8589636a8
@ -56,17 +56,6 @@ type Match struct {
|
|||||||
Srcs []netaddr.IPPrefix
|
Srcs []netaddr.IPPrefix
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clone returns a deep copy of m.
|
|
||||||
func (m Match) Clone() (res Match) {
|
|
||||||
if m.Dsts != nil {
|
|
||||||
res.Dsts = append([]NetPortRange{}, m.Dsts...)
|
|
||||||
}
|
|
||||||
if m.Srcs != nil {
|
|
||||||
res.Srcs = append([]netaddr.IPPrefix{}, m.Srcs...)
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m Match) String() string {
|
func (m Match) String() string {
|
||||||
srcs := []string{}
|
srcs := []string{}
|
||||||
for _, src := range m.Srcs {
|
for _, src := range m.Srcs {
|
||||||
@ -93,11 +82,3 @@ func (m Match) String() string {
|
|||||||
|
|
||||||
// Matches is a list of packet matchers.
|
// Matches is a list of packet matchers.
|
||||||
type Matches []Match
|
type Matches []Match
|
||||||
|
|
||||||
// Clone returns a deep copy of ms.
|
|
||||||
func (ms Matches) Clone() (res Matches) {
|
|
||||||
for _, match := range ms {
|
|
||||||
res = append(res, match.Clone())
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user