]> Cypherpunks repositories - gostls13.git/commit
net: avoid array copy when shuffling SRV records
authorRui Ueyama <ruiu@google.com>
Tue, 17 Jun 2014 01:00:28 +0000 (18:00 -0700)
committerRui Ueyama <ruiu@google.com>
Tue, 17 Jun 2014 01:00:28 +0000 (18:00 -0700)
commit38eea5b2ad6a6bf108cf4445506559118e34d782
treea68e16f2d6a873c08d74eb48caab7ee265dc84f2
parent60c0b3b5cf89c8054328e27d7ee58da79a12999e
net: avoid array copy when shuffling SRV records

We don't need to shift array elements to shuffle them.
We just have to swap a selected element with 0th element.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/91750044
src/pkg/net/dnsclient.go