Skip to content

Commit f062dba

Browse files
cuishuanggopherbot
authored andcommitted
all: fix some comments
Change-Id: I2fc378bec5e2d065fd4c9d27f36ab5b47748ffd0 Reviewed-on: https://go-review.googlesource.com/c/exp/+/464237 Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]>
1 parent dfa7d7a commit f062dba

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

cmd/gorelease/gorelease.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ func loadRetractions(ctx context.Context, modRoot string) ([]string, error) {
14701470
return retracted, nil
14711471
}
14721472

1473-
// ShortRetractionRationale returns a retraction rationale string that is safe
1473+
// shortRetractionRationale returns a retraction rationale string that is safe
14741474
// to print in a terminal. It returns hard-coded strings if the rationale
14751475
// is empty, too long, or contains non-printable characters.
14761476
//

ebnf/parser.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (p *parser) parseToken() *Token {
7272
return &Token{pos, value}
7373
}
7474

75-
// ParseTerm returns nil if no term was found.
75+
// parseTerm returns nil if no term was found.
7676
func (p *parser) parseTerm() (x Expression) {
7777
pos := p.pos
7878

errors/fmt/scan.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ func (s *ss) convertFloat(str string, n int) float64 {
779779
return f
780780
}
781781

782-
// convertComplex converts the next token to a complex128 value.
782+
// scanComplex converts the next token to a complex128 value.
783783
// The atof argument is a type-specific reader for the underlying type.
784784
// If we're reading complex64, atof will parse float32s and convert them
785785
// to float64's to avoid reproducing this code for each complex type.

slog/handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func (h *commonHandler) clone() *commonHandler {
195195
}
196196
}
197197

198-
// Enabled reports whether l is greater than or equal to the
198+
// enabled reports whether l is greater than or equal to the
199199
// minimum level.
200200
func (h *commonHandler) enabled(l Level) bool {
201201
minLevel := LevelInfo

slog/json_handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (h *JSONHandler) Enabled(_ context.Context, level Level) bool {
4848
return h.commonHandler.enabled(level)
4949
}
5050

51-
// With returns a new JSONHandler whose attributes consists
51+
// WithAttrs returns a new JSONHandler whose attributes consists
5252
// of h's attributes followed by attrs.
5353
func (h *JSONHandler) WithAttrs(attrs []Attr) Handler {
5454
return &JSONHandler{commonHandler: h.commonHandler.withAttrs(attrs)}

slog/text_handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (h *TextHandler) Enabled(_ context.Context, level Level) bool {
4444
return h.commonHandler.enabled(level)
4545
}
4646

47-
// With returns a new TextHandler whose attributes consists
47+
// WithAttrs returns a new TextHandler whose attributes consists
4848
// of h's attributes followed by attrs.
4949
func (h *TextHandler) WithAttrs(attrs []Attr) Handler {
5050
return &TextHandler{commonHandler: h.commonHandler.withAttrs(attrs)}

slog/value_safe.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (v Value) str() string {
4848
return v.s
4949
}
5050

51-
// String returns a new Value for a string.
51+
// StringValue returns a new Value for a string.
5252
func StringValue(value string) Value {
5353
return Value{s: value, any: KindString}
5454
}

slog/value_unsafe.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (v Value) Kind() Kind {
5757
}
5858
}
5959

60-
// String returns a new Value for a string.
60+
// StringValue returns a new Value for a string.
6161
func StringValue(value string) Value {
6262
hdr := (*reflect.StringHeader)(unsafe.Pointer(&value))
6363
return Value{num: uint64(hdr.Len), any: stringptr(hdr.Data)}
@@ -92,7 +92,7 @@ func groupValue(as []Attr) Value {
9292
return Value{num: uint64(hdr.Len), any: groupptr(hdr.Data)}
9393
}
9494

95-
// Group returns the Value's value as a []Attr.
95+
// group returns the Value's value as a []Attr.
9696
// It panics if the Value's Kind is not KindGroup.
9797
func (v Value) group() []Attr {
9898
if sp, ok := v.any.(groupptr); ok {

0 commit comments

Comments
 (0)