Skip to content

Commit 2124140

Browse files
cuishuanggopherbot
authored andcommitted
all: make function and struct comments match the names
Change-Id: I1f4a4c8daec5ac7d26f1d4df76726af664adcb36 Reviewed-on: https://go-review.googlesource.com/c/net/+/639576 Reviewed-by: Jorropo <jorropo.pgm@gmail.com> Auto-Submit: Damien Neil <dneil@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com> Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Jorropo <jorropo.pgm@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
1 parent e9d95ba commit 2124140

17 files changed

+21
-21
lines changed

http2/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func configFromServer(h1 *http.Server, h2 *Server) http2Config {
6060
return conf
6161
}
6262

63-
// configFromServer merges configuration settings from h2 and h2.t1.HTTP2
63+
// configFromTransport merges configuration settings from h2 and h2.t1.HTTP2
6464
// (the net/http Transport).
6565
func configFromTransport(h2 *Transport) http2Config {
6666
conf := http2Config{

http2/config_go124.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) {
1313
fillNetHTTPConfig(conf, srv.HTTP2)
1414
}
1515

16-
// fillNetHTTPServerConfig sets fields in conf from tr.HTTP2.
16+
// fillNetHTTPTransportConfig sets fields in conf from tr.HTTP2.
1717
func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) {
1818
fillNetHTTPConfig(conf, tr.HTTP2)
1919
}

http2/gate_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func newGate() gate {
2424
return g
2525
}
2626

27-
// newLocked gate returns a new, locked gate.
27+
// newLockedGate returns a new, locked gate.
2828
func newLockedGate() gate {
2929
return gate{
3030
set: make(chan struct{}, 1),
@@ -78,7 +78,7 @@ func (g *gate) unlock(set bool) {
7878
}
7979
}
8080

81-
// unlock sets the condition to the result of f and releases the gate.
81+
// unlockFunc sets the condition to the result of f and releases the gate.
8282
// Useful in defers.
8383
func (g *gate) unlockFunc(f func() bool) {
8484
g.unlock(f())

http2/netconn_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func (c *synctestNetConn) Write(b []byte) (n int, err error) {
7676
return c.rem.write(b)
7777
}
7878

79-
// IsClosed reports whether the peer has closed its end of the connection.
79+
// IsClosedByPeer reports whether the peer has closed its end of the connection.
8080
func (c *synctestNetConn) IsClosedByPeer() bool {
8181
if c.autoWait {
8282
c.group.Wait()

http2/server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4327,7 +4327,7 @@ func TestCanonicalHeaderCacheGrowth(t *testing.T) {
43274327
}
43284328
}
43294329

4330-
// TestServerWriteDoesNotRetainBufferAfterStreamClose checks for access to
4330+
// TestServerWriteDoesNotRetainBufferAfterReturn checks for access to
43314331
// the slice passed to ResponseWriter.Write after Write returns.
43324332
//
43334333
// Terminating the request stream on the client causes Write to return.

quic/conn_close.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func (c *Conn) sendOK(now time.Time) bool {
178178
}
179179
}
180180

181-
// sendConnectionClose reports that the conn has sent a CONNECTION_CLOSE to the peer.
181+
// sentConnectionClose reports that the conn has sent a CONNECTION_CLOSE to the peer.
182182
func (c *Conn) sentConnectionClose(now time.Time) {
183183
switch c.lifetime.state {
184184
case connStatePeerClosed:

quic/conn_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ func (tc *testConn) write(d *testDatagram) {
436436
tc.endpoint.writeDatagram(d)
437437
}
438438

439-
// writeFrame sends the Conn a datagram containing the given frames.
439+
// writeFrames sends the Conn a datagram containing the given frames.
440440
func (tc *testConn) writeFrames(ptype packetType, frames ...debugFrame) {
441441
tc.t.Helper()
442442
space := spaceForPacketType(ptype)

quic/endpoint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ func (m *connsMap) updateConnIDs(f func(*connsMap)) {
448448
m.updateNeeded.Store(true)
449449
}
450450

451-
// applyConnIDUpdates is called by the datagram receive loop to update its connection ID map.
451+
// applyUpdates is called by the datagram receive loop to update its connection ID map.
452452
func (m *connsMap) applyUpdates() {
453453
m.updateMu.Lock()
454454
defer m.updateMu.Unlock()

quic/gate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func newGate() gate {
2727
return g
2828
}
2929

30-
// newLocked gate returns a new, locked gate.
30+
// newLockedGate returns a new, locked gate.
3131
func newLockedGate() gate {
3232
return gate{
3333
set: make(chan struct{}, 1),
@@ -84,7 +84,7 @@ func (g *gate) unlock(set bool) {
8484
}
8585
}
8686

87-
// unlock sets the condition to the result of f and releases the gate.
87+
// unlockFunc sets the condition to the result of f and releases the gate.
8888
// Useful in defers.
8989
func (g *gate) unlockFunc(f func() bool) {
9090
g.unlock(f())

quic/packet_protection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ func hashForSuite(suite uint16) (h crypto.Hash, keySize int) {
519519
}
520520
}
521521

522-
// hdkfExpandLabel implements HKDF-Expand-Label from RFC 8446, Section 7.1.
522+
// hkdfExpandLabel implements HKDF-Expand-Label from RFC 8446, Section 7.1.
523523
//
524524
// Copied from crypto/tls/key_schedule.go.
525525
func hkdfExpandLabel(hash func() hash.Hash, secret []byte, label string, context []byte, length int) []byte {

0 commit comments

Comments
 (0)