diff options
author | Josh Bleecher Snyder <josh@tailscale.com> | 2020-12-22 11:38:24 -0800 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-01-07 14:49:44 +0100 |
commit | 1481e72107db7b42db88047ad1faf7cb6924fb78 (patch) | |
tree | cee7d0df35c37e9b03bae2d5330d0a2949f209af /device/allowedips_test.go | |
parent | d0f8e9477c14a1c92f84beb46cd17b91c56fae44 (diff) |
all: use ++ to increment
Make the code slightly more idiomatic. No functional changes.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Diffstat (limited to 'device/allowedips_test.go')
-rw-r--r-- | device/allowedips_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/device/allowedips_test.go b/device/allowedips_test.go index 005df48..27028a6 100644 --- a/device/allowedips_test.go +++ b/device/allowedips_test.go @@ -70,11 +70,11 @@ func benchmarkTrie(peerNumber int, addressNumber int, addressLength int, b *test const AddressLength = 4 - for n := 0; n < peerNumber; n += 1 { + for n := 0; n < peerNumber; n++ { peers = append(peers, &Peer{}) } - for n := 0; n < addressNumber; n += 1 { + for n := 0; n < addressNumber; n++ { var addr [AddressLength]byte rand.Read(addr[:]) cidr := uint(rand.Uint32() % (AddressLength * 8)) @@ -82,7 +82,7 @@ func benchmarkTrie(peerNumber int, addressNumber int, addressLength int, b *test trie = trie.insert(addr[:], cidr, peers[index]) } - for n := 0; n < b.N; n += 1 { + for n := 0; n < b.N; n++ { var addr [AddressLength]byte rand.Read(addr[:]) trie.lookup(addr[:]) |