mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-18 05:18:23 +00:00
all: use iterators over slice views more
This gets close to all of the remaining ones. Updates #12912 Change-Id: I9c672bbed2654a6c5cab31e0cbece6c107d8c6fa Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
00be1761b7
commit
4e0fc037e6
@@ -102,8 +102,7 @@ func (c *Conn) ServeHTTPDebug(w http.ResponseWriter, r *http.Request) {
|
||||
sort.Slice(ent, func(i, j int) bool { return ent[i].pub.Less(ent[j].pub) })
|
||||
|
||||
peers := map[key.NodePublic]tailcfg.NodeView{}
|
||||
for i := range c.peers.Len() {
|
||||
p := c.peers.At(i)
|
||||
for _, p := range c.peers.All() {
|
||||
peers[p.Key()] = p
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user