Skip to content

Commit e12d8a9

Browse files
cuishuangRobert Griesemer
authored andcommitted
all: remove extra space in the comments
Change-Id: I26302d801732f40b1fe6b30ff69d222047bca490 Reviewed-on: https://go-review.googlesource.com/c/go/+/716740 Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
1 parent c555934 commit e12d8a9

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

src/bytes/bytes_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ func TestMap(t *testing.T) {
12241224
// Run a couple of awful growth/shrinkage tests
12251225
a := tenRunes('a')
12261226

1227-
// 1. Grow. This triggers two reallocations in Map.
1227+
// 1. Grow. This triggers two reallocations in Map.
12281228
maxRune := func(r rune) rune { return unicode.MaxRune }
12291229
m := Map(maxRune, []byte(a))
12301230
expect := tenRunes(unicode.MaxRune)

src/cmd/cgo/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ environment variable when running the go tool: set it to 1 to enable
127127
the use of cgo, and to 0 to disable it. The go tool will set the
128128
build constraint "cgo" if cgo is enabled. The special import "C"
129129
implies the "cgo" build constraint, as though the file also said
130-
"//go:build cgo". Therefore, if cgo is disabled, files that import
130+
"//go:build cgo". Therefore, if cgo is disabled, files that import
131131
"C" will not be built by the go tool. (For more about build constraints
132132
see https://golang.org/pkg/go/build/#hdr-Build_Constraints).
133133

src/cmd/cgo/gcc.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ func (p *Package) rewriteCall(f *File, call *Call) (string, bool) {
10561056
func (p *Package) needsPointerCheck(f *File, t ast.Expr, arg ast.Expr) bool {
10571057
// An untyped nil does not need a pointer check, and when
10581058
// _cgoCheckPointer returns the untyped nil the type assertion we
1059-
// are going to insert will fail. Easier to just skip nil arguments.
1059+
// are going to insert will fail. Easier to just skip nil arguments.
10601060
// TODO: Note that this fails if nil is shadowed.
10611061
if id, ok := arg.(*ast.Ident); ok && id.Name == "nil" {
10621062
return false
@@ -3010,7 +3010,7 @@ func (c *typeConv) FuncType(dtype *dwarf.FuncType, pos token.Pos) *FuncType {
30103010
for i, f := range dtype.ParamType {
30113011
// gcc's DWARF generator outputs a single DotDotDotType parameter for
30123012
// function pointers that specify no parameters (e.g. void
3013-
// (*__cgo_0)()). Treat this special case as void. This case is
3013+
// (*__cgo_0)()). Treat this special case as void. This case is
30143014
// invalid according to ISO C anyway (i.e. void (*__cgo_1)(...) is not
30153015
// legal).
30163016
if _, ok := f.(*dwarf.DotDotDotType); ok && i == 0 {
@@ -3081,7 +3081,7 @@ func (c *typeConv) Struct(dt *dwarf.StructType, pos token.Pos) (expr *ast.Struct
30813081
off := int64(0)
30823082

30833083
// Rename struct fields that happen to be named Go keywords into
3084-
// _{keyword}. Create a map from C ident -> Go ident. The Go ident will
3084+
// _{keyword}. Create a map from C ident -> Go ident. The Go ident will
30853085
// be mangled. Any existing identifier that already has the same name on
30863086
// the C-side will cause the Go-mangled version to be prefixed with _.
30873087
// (e.g. in a struct with fields '_type' and 'type', the latter would be
@@ -3309,7 +3309,7 @@ func godefsFields(fld []*ast.Field) {
33093309
// fieldPrefix returns the prefix that should be removed from all the
33103310
// field names when generating the C or Go code. For generated
33113311
// C, we leave the names as is (tv_sec, tv_usec), since that's what
3312-
// people are used to seeing in C. For generated Go code, such as
3312+
// people are used to seeing in C. For generated Go code, such as
33133313
// package syscall's data structures, we drop a common prefix
33143314
// (so sec, usec, which will get turned into Sec, Usec for exporting).
33153315
func fieldPrefix(fld []*ast.Field) string {
@@ -3456,7 +3456,7 @@ func (c *typeConv) badCFType(dt *dwarf.TypedefType) bool {
34563456
// Tagged pointer support
34573457
// Low-bit set means tagged object, next 3 bits (currently)
34583458
// define the tagged object class, next 4 bits are for type
3459-
// information for the specific tagged object class. Thus,
3459+
// information for the specific tagged object class. Thus,
34603460
// the low byte is for type info, and the rest of a pointer
34613461
// (32 or 64-bit) is for payload, whatever the tagged class.
34623462
//

src/cmd/cgo/internal/test/buildid_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
package cgotest
66

7-
// Test that we have no more than one build ID. In the past we used
7+
// Test that we have no more than one build ID. In the past we used
88
// to generate a separate build ID for each package using cgo, and the
9-
// linker concatenated them all. We don't want that--we only want
9+
// linker concatenated them all. We don't want that--we only want
1010
// one.
1111

1212
import (
@@ -42,7 +42,7 @@ sections:
4242
for len(d) > 0 {
4343

4444
// ELF standards differ as to the sizes in
45-
// note sections. Both the GNU linker and
45+
// note sections. Both the GNU linker and
4646
// gold always generate 32-bit sizes, so that
4747
// is what we assume here.
4848

src/cmd/cgo/internal/test/callback.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func nestedCall(f func()) {
4040
callbackMutex.Unlock()
4141

4242
// Pass the address of i because the C function was written to
43-
// take a pointer. We could pass an int if we felt like
43+
// take a pointer. We could pass an int if we felt like
4444
// rewriting the C code.
4545
C.callback(unsafe.Pointer(&i))
4646

src/cmd/cgo/internal/test/gcc68255/a.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// license that can be found in the LICENSE file.
44

55
// Test that it's OK to have C code that does nothing other than
6-
// initialize a global variable. This used to fail with gccgo.
6+
// initialize a global variable. This used to fail with gccgo.
77

88
package gcc68255
99

src/cmd/cgo/internal/teststdio/testdata/fib.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//go:build test_run
66

77
// Compute Fibonacci numbers with two goroutines
8-
// that pass integers back and forth. No actual
8+
// that pass integers back and forth. No actual
99
// concurrency, just threads and synchronization
1010
// and foreign code on multiple pthreads.
1111

src/strings/strings_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ func rot13(r rune) rune {
694694
func TestMap(t *testing.T) {
695695
// Run a couple of awful growth/shrinkage tests
696696
a := tenRunes('a')
697-
// 1. Grow. This triggers two reallocations in Map.
697+
// 1. Grow. This triggers two reallocations in Map.
698698
maxRune := func(rune) rune { return unicode.MaxRune }
699699
m := Map(maxRune, a)
700700
expect := tenRunes(unicode.MaxRune)

0 commit comments

Comments
 (0)