From 415cb6d518e71d202e2dc2f44c475cbff84eee72 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Tue, 7 Feb 2023 22:07:18 +0800 Subject: [PATCH] all: fix some comments Change-Id: Iee11c27052222f017b672c06ced9e129ee51619c Reviewed-on: https://go-review.googlesource.com/c/net/+/465996 Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: David Chase TryBot-Result: Gopher Robot --- html/parse.go | 2 +- http2/flow.go | 2 +- http2/hpack/hpack.go | 2 +- http2/transport.go | 2 +- trace/histogram.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/html/parse.go b/html/parse.go index 291c91908d..46a89eda6c 100644 --- a/html/parse.go +++ b/html/parse.go @@ -184,7 +184,7 @@ func (p *parser) clearStackToContext(s scope) { } } -// parseGenericRawTextElements implements the generic raw text element parsing +// parseGenericRawTextElement implements the generic raw text element parsing // algorithm defined in 12.2.6.2. // https://html.spec.whatwg.org/multipage/parsing.html#parsing-elements-that-contain-only-text // TODO: Since both RAWTEXT and RCDATA states are treated as tokenizer's part diff --git a/http2/flow.go b/http2/flow.go index 750ac52f2a..b7dbd18695 100644 --- a/http2/flow.go +++ b/http2/flow.go @@ -18,7 +18,7 @@ type inflow struct { unsent int32 } -// set sets the initial window. +// init sets the initial window. func (f *inflow) init(n int32) { f.avail = n } diff --git a/http2/hpack/hpack.go b/http2/hpack/hpack.go index ebdfbee964..b184a2771a 100644 --- a/http2/hpack/hpack.go +++ b/http2/hpack/hpack.go @@ -211,7 +211,7 @@ func (d *Decoder) at(i uint64) (hf HeaderField, ok bool) { return dt.ents[dt.len()-(int(i)-staticTable.len())], true } -// Decode decodes an entire block. +// DecodeFull decodes an entire block. // // TODO: remove this method and make it incremental later? This is // easier for debugging now. diff --git a/http2/transport.go b/http2/transport.go index b43ec10cfe..05ba23d3d9 100644 --- a/http2/transport.go +++ b/http2/transport.go @@ -1569,7 +1569,7 @@ func (cs *clientStream) cleanupWriteRequest(err error) { close(cs.donec) } -// awaitOpenSlotForStream waits until len(streams) < maxConcurrentStreams. +// awaitOpenSlotForStreamLocked waits until len(streams) < maxConcurrentStreams. // Must hold cc.mu. func (cc *ClientConn) awaitOpenSlotForStreamLocked(cs *clientStream) error { for { diff --git a/trace/histogram.go b/trace/histogram.go index 9bf4286c79..d6c71101e4 100644 --- a/trace/histogram.go +++ b/trace/histogram.go @@ -32,7 +32,7 @@ type histogram struct { valueCount int64 // number of values recorded for single value } -// AddMeasurement records a value measurement observation to the histogram. +// addMeasurement records a value measurement observation to the histogram. func (h *histogram) addMeasurement(value int64) { // TODO: assert invariant h.sum += value