MCPcopy
hub / github.com/WireGuard/wireguard-go / RemoveByPeer

Method RemoveByPeer

device/allowedips_rand_test.go:70–79  ·  view source on GitHub ↗
(peer *Peer)

Source from the content-addressed store, hash-verified

68}
69
70func (r SlowRouter) RemoveByPeer(peer *Peer) SlowRouter {
71 n := 0
72 for _, x := range r {
73 if x.peer != peer {
74 r[n] = x
75 n++
76 }
77 }
78 return r[:n]
79}
80
81func TestTrieRandom(t *testing.T) {
82 var slow4, slow6 SlowRouter

Callers 1

TestTrieRandomFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected