crypto/tls: gofmt

Commit fa3543e introduced formatting errors.

Change-Id: I4b921f391a9b463cefca4318ad63b70ae6ce6865
Reviewed-on: https://go-review.googlesource.com/23514
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: David Chase <drchase@google.com>
This commit is contained in:
Austin Clements 2016-05-27 14:25:16 -04:00 committed by David Chase
parent cbcba9f9b6
commit 5166c9e255
2 changed files with 8 additions and 9 deletions

View File

@ -796,7 +796,7 @@ func (c *Conn) maxPayloadSizeForWrite(typ recordType, explicitIVLen int) int {
return maxPlaintext // avoid overflow in multiply below return maxPlaintext // avoid overflow in multiply below
} }
n := payloadBytes * int(pkt + 1) n := payloadBytes * int(pkt+1)
if n > maxPlaintext { if n > maxPlaintext {
n = maxPlaintext n = maxPlaintext
} }

View File

@ -527,7 +527,7 @@ func throughput(b *testing.B, totalBytes int64, dynamicRecordSizingDisabled bool
func BenchmarkThroughput(b *testing.B) { func BenchmarkThroughput(b *testing.B) {
for _, mode := range []string{"Max", "Dynamic"} { for _, mode := range []string{"Max", "Dynamic"} {
for size := 1; size <= 64; size<<=1{ for size := 1; size <= 64; size <<= 1 {
name := fmt.Sprintf("%sPacket/%dMB", mode, size) name := fmt.Sprintf("%sPacket/%dMB", mode, size)
b.Run(name, func(b *testing.B) { b.Run(name, func(b *testing.B) {
throughput(b, int64(size<<20), mode == "Max") throughput(b, int64(size<<20), mode == "Max")
@ -548,8 +548,8 @@ func (c *slowConn) Write(p []byte) (int, error) {
t0 := time.Now() t0 := time.Now()
wrote := 0 wrote := 0
for wrote < len(p) { for wrote < len(p) {
time.Sleep(100*time.Microsecond) time.Sleep(100 * time.Microsecond)
allowed := int(time.Since(t0).Seconds() * float64(c.bps)) / 8 allowed := int(time.Since(t0).Seconds()*float64(c.bps)) / 8
if allowed > len(p) { if allowed > len(p) {
allowed = len(p) allowed = len(p)
} }
@ -617,7 +617,6 @@ func latency(b *testing.B, bps int, dynamicRecordSizingDisabled bool) {
} }
} }
func BenchmarkLatency(b *testing.B) { func BenchmarkLatency(b *testing.B) {
for _, mode := range []string{"Max", "Dynamic"} { for _, mode := range []string{"Max", "Dynamic"} {
for _, kbps := range []int{200, 500, 1000, 2000, 5000} { for _, kbps := range []int{200, 500, 1000, 2000, 5000} {