]> Cypherpunks repositories - gostls13.git/commitdiff
all: remove extra space in the comments
authorcuishuang <imcusg@gmail.com>
Fri, 31 Oct 2025 09:42:00 +0000 (17:42 +0800)
committerRobert Griesemer <gri@google.com>
Mon, 3 Nov 2025 18:05:39 +0000 (10:05 -0800)
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>
src/bytes/bytes_test.go
src/cmd/cgo/doc.go
src/cmd/cgo/gcc.go
src/cmd/cgo/internal/test/buildid_linux.go
src/cmd/cgo/internal/test/callback.go
src/cmd/cgo/internal/test/gcc68255/a.go
src/cmd/cgo/internal/teststdio/testdata/fib.go
src/strings/strings_test.go

index f18915c879e097e2ebd64ec70cfe631f7246adc4..9547ede312fc0fe6c73c399382f58773d0c7c722 100644 (file)
@@ -1224,7 +1224,7 @@ func TestMap(t *testing.T) {
        // Run a couple of awful growth/shrinkage tests
        a := tenRunes('a')
 
-       // 1.  Grow. This triggers two reallocations in Map.
+       // 1. Grow. This triggers two reallocations in Map.
        maxRune := func(r rune) rune { return unicode.MaxRune }
        m := Map(maxRune, []byte(a))
        expect := tenRunes(unicode.MaxRune)
index ef5272299bbf077ce3167d1d0f37818e6471e28d..7e8486874ef142a9a998f879b08676342b8988e6 100644 (file)
@@ -127,7 +127,7 @@ environment variable when running the go tool: set it to 1 to enable
 the use of cgo, and to 0 to disable it. The go tool will set the
 build constraint "cgo" if cgo is enabled. The special import "C"
 implies the "cgo" build constraint, as though the file also said
-"//go:build cgo".  Therefore, if cgo is disabled, files that import
+"//go:build cgo". Therefore, if cgo is disabled, files that import
 "C" will not be built by the go tool. (For more about build constraints
 see https://golang.org/pkg/go/build/#hdr-Build_Constraints).
 
index 886ddf2d461b6508e4aba10dd340c585a4108689..d1b629057ab4a82ee18a77783e07de3d638ccdce 100644 (file)
@@ -1056,7 +1056,7 @@ func (p *Package) rewriteCall(f *File, call *Call) (string, bool) {
 func (p *Package) needsPointerCheck(f *File, t ast.Expr, arg ast.Expr) bool {
        // An untyped nil does not need a pointer check, and when
        // _cgoCheckPointer returns the untyped nil the type assertion we
-       // are going to insert will fail.  Easier to just skip nil arguments.
+       // are going to insert will fail. Easier to just skip nil arguments.
        // TODO: Note that this fails if nil is shadowed.
        if id, ok := arg.(*ast.Ident); ok && id.Name == "nil" {
                return false
@@ -3010,7 +3010,7 @@ func (c *typeConv) FuncType(dtype *dwarf.FuncType, pos token.Pos) *FuncType {
        for i, f := range dtype.ParamType {
                // gcc's DWARF generator outputs a single DotDotDotType parameter for
                // function pointers that specify no parameters (e.g. void
-               // (*__cgo_0)()).  Treat this special case as void. This case is
+               // (*__cgo_0)()). Treat this special case as void. This case is
                // invalid according to ISO C anyway (i.e. void (*__cgo_1)(...) is not
                // legal).
                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
        off := int64(0)
 
        // Rename struct fields that happen to be named Go keywords into
-       // _{keyword}.  Create a map from C ident -> Go ident. The Go ident will
+       // _{keyword}. Create a map from C ident -> Go ident. The Go ident will
        // be mangled. Any existing identifier that already has the same name on
        // the C-side will cause the Go-mangled version to be prefixed with _.
        // (e.g. in a struct with fields '_type' and 'type', the latter would be
@@ -3309,7 +3309,7 @@ func godefsFields(fld []*ast.Field) {
 // fieldPrefix returns the prefix that should be removed from all the
 // field names when generating the C or Go code. For generated
 // C, we leave the names as is (tv_sec, tv_usec), since that's what
-// people are used to seeing in C.  For generated Go code, such as
+// people are used to seeing in C. For generated Go code, such as
 // package syscall's data structures, we drop a common prefix
 // (so sec, usec, which will get turned into Sec, Usec for exporting).
 func fieldPrefix(fld []*ast.Field) string {
@@ -3456,7 +3456,7 @@ func (c *typeConv) badCFType(dt *dwarf.TypedefType) bool {
 // Tagged pointer support
 // Low-bit set means tagged object, next 3 bits (currently)
 // define the tagged object class, next 4 bits are for type
-// information for the specific tagged object class.  Thus,
+// information for the specific tagged object class. Thus,
 // the low byte is for type info, and the rest of a pointer
 // (32 or 64-bit) is for payload, whatever the tagged class.
 //
index 84d3edb664eb25534e998f54c1402dfd1cbc2418..7e0fd0fd126a02ff30f8e9185f9de198a39b7e57 100644 (file)
@@ -4,9 +4,9 @@
 
 package cgotest
 
-// Test that we have no more than one build ID.  In the past we used
+// Test that we have no more than one build ID. In the past we used
 // to generate a separate build ID for each package using cgo, and the
-// linker concatenated them all.  We don't want that--we only want
+// linker concatenated them all. We don't want that--we only want
 // one.
 
 import (
@@ -42,7 +42,7 @@ sections:
                for len(d) > 0 {
 
                        // ELF standards differ as to the sizes in
-                       // note sections.  Both the GNU linker and
+                       // note sections. Both the GNU linker and
                        // gold always generate 32-bit sizes, so that
                        // is what we assume here.
 
index 478bf8294af3a5d855b16fdb6f0e6fe5993044ae..8f8dd8fded6f153c2e351d7000f49f7aa281c1f4 100644 (file)
@@ -40,7 +40,7 @@ func nestedCall(f func()) {
        callbackMutex.Unlock()
 
        // Pass the address of i because the C function was written to
-       // take a pointer.  We could pass an int if we felt like
+       // take a pointer. We could pass an int if we felt like
        // rewriting the C code.
        C.callback(unsafe.Pointer(&i))
 
index e106dee3ec023d652ff9b5e9f917106a2b84e8d8..cc4804b90bd1224db57eadbdb754485c8bc2ee45 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Test that it's OK to have C code that does nothing other than
-// initialize a global variable.  This used to fail with gccgo.
+// initialize a global variable. This used to fail with gccgo.
 
 package gcc68255
 
index 96173683353151458b698f6a0409aacfa8cd1177..69147880c20df2d281224132f7141f92c1bd003d 100644 (file)
@@ -5,7 +5,7 @@
 //go:build test_run
 
 // Compute Fibonacci numbers with two goroutines
-// that pass integers back and forth.  No actual
+// that pass integers back and forth. No actual
 // concurrency, just threads and synchronization
 // and foreign code on multiple pthreads.
 
index b10b5f05ccae53a65f62cfeb53985576d8f5dc9c..edfeb0e8138b2f234ce3f4880004babfa79eb753 100644 (file)
@@ -694,7 +694,7 @@ func rot13(r rune) rune {
 func TestMap(t *testing.T) {
        // Run a couple of awful growth/shrinkage tests
        a := tenRunes('a')
-       // 1.  Grow. This triggers two reallocations in Map.
+       // 1. Grow. This triggers two reallocations in Map.
        maxRune := func(rune) rune { return unicode.MaxRune }
        m := Map(maxRune, a)
        expect := tenRunes(unicode.MaxRune)