Skip to content

Commit 788245c

Browse files
committed
go/printer, gofmt: improved comma placement
Not a Go 1 issue, but appeared to be fairly easy to fix. - Note that a few existing test cases look slightly worse but those cases were not representative for real code. All real code looks better now. - Manual move of the comment in go/scanner/example_test.go before applying gofmt. - gofmt -w $GOROOT/src $GOROOT/misc Fixes golang#3062. R=rsc CC=golang-dev https://golang.org/cl/5674093
1 parent 7b88ead commit 788245c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

handshake_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ func (c *Conn) clientHandshake() error {
273273
masterSecret, clientMAC, serverMAC, clientKey, serverKey, clientIV, serverIV :=
274274
keysFromPreMasterSecret(c.vers, preMasterSecret, hello.random, serverHello.random, suite.macLen, suite.keyLen, suite.ivLen)
275275

276-
clientCipher := suite.cipher(clientKey, clientIV, false /* not for reading */ )
276+
clientCipher := suite.cipher(clientKey, clientIV, false /* not for reading */)
277277
clientHash := suite.mac(c.vers, clientMAC)
278278
c.out.prepareCipherSpec(c.vers, clientCipher, clientHash)
279279
c.writeRecord(recordTypeChangeCipherSpec, []byte{1})
@@ -294,7 +294,7 @@ func (c *Conn) clientHandshake() error {
294294
finishedHash.Write(finished.marshal())
295295
c.writeRecord(recordTypeHandshake, finished.marshal())
296296

297-
serverCipher := suite.cipher(serverKey, serverIV, true /* for reading */ )
297+
serverCipher := suite.cipher(serverKey, serverIV, true /* for reading */)
298298
serverHash := suite.mac(c.vers, serverMAC)
299299
c.in.prepareCipherSpec(c.vers, serverCipher, serverHash)
300300
c.readRecord(recordTypeChangeCipherSpec)

handshake_server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ FindCipherSuite:
295295
masterSecret, clientMAC, serverMAC, clientKey, serverKey, clientIV, serverIV :=
296296
keysFromPreMasterSecret(c.vers, preMasterSecret, clientHello.random, hello.random, suite.macLen, suite.keyLen, suite.ivLen)
297297

298-
clientCipher := suite.cipher(clientKey, clientIV, true /* for reading */ )
298+
clientCipher := suite.cipher(clientKey, clientIV, true /* for reading */)
299299
clientHash := suite.mac(c.vers, clientMAC)
300300
c.in.prepareCipherSpec(c.vers, clientCipher, clientHash)
301301
c.readRecord(recordTypeChangeCipherSpec)
@@ -333,7 +333,7 @@ FindCipherSuite:
333333

334334
finishedHash.Write(clientFinished.marshal())
335335

336-
serverCipher := suite.cipher(serverKey, serverIV, false /* not for reading */ )
336+
serverCipher := suite.cipher(serverKey, serverIV, false /* not for reading */)
337337
serverHash := suite.mac(c.vers, serverMAC)
338338
c.out.prepareCipherSpec(c.vers, serverCipher, serverHash)
339339
c.writeRecord(recordTypeChangeCipherSpec, []byte{1})

0 commit comments

Comments
 (0)