]> Cypherpunks.ru repositories - gostls13.git/commitdiff
all: remove newline characters after return statements
authorDanil Timerbulatov <timerbulatov.danila@gmail.com>
Thu, 7 Dec 2023 21:17:19 +0000 (00:17 +0300)
committerGopher Robot <gobot@golang.org>
Thu, 14 Dec 2023 17:22:18 +0000 (17:22 +0000)
This commit is aimed at improving the readability and consistency
of the code base. Extraneous newline characters were present after
some return statements, creating unnecessary separation in the code.

Fixes #64610

Change-Id: Ic1b05bf11761c4dff22691c2f1c3755f66d341f7
Reviewed-on: https://go-review.googlesource.com/c/go/+/548316
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
32 files changed:
src/cmd/compile/internal/base/hashdebug.go
src/cmd/compile/internal/loopvar/loopvar_test.go
src/cmd/compile/internal/loopvar/testdata/opt-121.go
src/cmd/compile/internal/loopvar/testdata/opt-122.go
src/cmd/compile/internal/loopvar/testdata/opt.go
src/cmd/compile/internal/ssa/func.go
src/cmd/compile/internal/test/testdata/ctl_test.go
src/cmd/link/internal/loadxcoff/ldxcoff.go
src/cmd/link/internal/mips/obj.go
src/cmd/link/internal/ppc64/asm.go
src/database/sql/convert.go
src/hash/fnv/fnv.go
src/internal/bisect/bisect.go
src/internal/syscall/unix/at_fstatat.go
src/log/slog/logger.go
src/math/big/float_test.go
src/net/http/server.go
src/os/file_plan9.go
src/runtime/os2_aix.go
src/runtime/runtime1.go
src/runtime/syscall_aix.go
src/runtime/traceback_test.go
src/text/template/parse/node.go
test/codegen/bits.go
test/codegen/memcombine.go
test/codegen/noextend.go
test/escape2.go
test/escape2n.go
test/fixedbugs/issue32680b.go
test/fixedbugs/issue56923.go
test/typeparam/issue50485.dir/a.go
test/typeparam/issue51925.go

index de7f01f09e5b04be328656dd6e2b00c73db66fbf..8342a5b9d93d3012ca614a4c25c4321e3126008d 100644 (file)
@@ -204,7 +204,6 @@ func NewHashDebug(ev, s string, file io.Writer) *HashDebug {
                i++
        }
        return hd
-
 }
 
 // TODO: Delete when we switch to bisect-only.
index c8e11dbd07b4b06ff051f78c550dadbf0eeaa821..64cfdb77d99f2b844135ec73cca9ee75bb7734aa 100644 (file)
@@ -251,7 +251,7 @@ func TestLoopVarVersionEnableFlag(t *testing.T) {
 
        t.Logf(m)
 
-       yCount := strings.Count(m, "opt.go:16:6: loop variable private now per-iteration, heap-allocated (loop inlined into ./opt.go:30)")
+       yCount := strings.Count(m, "opt.go:16:6: loop variable private now per-iteration, heap-allocated (loop inlined into ./opt.go:29)")
        nCount := strings.Count(m, "shared")
 
        if yCount != 1 {
@@ -290,7 +290,7 @@ func TestLoopVarVersionEnableGoBuild(t *testing.T) {
 
        t.Logf(m)
 
-       yCount := strings.Count(m, "opt-122.go:18:6: loop variable private now per-iteration, heap-allocated (loop inlined into ./opt-122.go:32)")
+       yCount := strings.Count(m, "opt-122.go:18:6: loop variable private now per-iteration, heap-allocated (loop inlined into ./opt-122.go:31)")
        nCount := strings.Count(m, "shared")
 
        if yCount != 1 {
@@ -329,7 +329,7 @@ func TestLoopVarVersionDisableFlag(t *testing.T) {
 
        t.Logf(m) // expect error
 
-       yCount := strings.Count(m, "opt.go:16:6: loop variable private now per-iteration, heap-allocated (loop inlined into ./opt.go:30)")
+       yCount := strings.Count(m, "opt.go:16:6: loop variable private now per-iteration, heap-allocated (loop inlined into ./opt.go:29)")
        nCount := strings.Count(m, "shared")
 
        if yCount != 0 {
@@ -368,7 +368,7 @@ func TestLoopVarVersionDisableGoBuild(t *testing.T) {
 
        t.Logf(m) // expect error
 
-       yCount := strings.Count(m, "opt-121.go:18:6: loop variable private now per-iteration, heap-allocated (loop inlined into ./opt-121.go:32)")
+       yCount := strings.Count(m, "opt-121.go:18:6: loop variable private now per-iteration, heap-allocated (loop inlined into ./opt-121.go:31)")
        nCount := strings.Count(m, "shared")
 
        if yCount != 0 {
index 131033b13c31ec973b47040a532650c72c1e77da..4afb658fc8d1daf5c95c9024c0fadc55557b86c2 100644 (file)
@@ -19,7 +19,6 @@ func inline(j, k int) []*int {
                a = append(a, &private)
        }
        return a
-
 }
 
 //go:noinline
index 0ed6feee04b17e3489d1a2d9f8e4a0a674eb50da..9dceab91752fdbec40d9bbc7eaddbe4fbee02972 100644 (file)
@@ -19,7 +19,6 @@ func inline(j, k int) []*int {
                a = append(a, &private)
        }
        return a
-
 }
 
 //go:noinline
index 1bcd73614d8a041b17fcf12cb3bd123fae7525be..82c8616bcd367628a6d72d29aa9c573ed38abb24 100644 (file)
@@ -17,7 +17,6 @@ func inline(j, k int) []*int {
                a = append(a, &private)
        }
        return a
-
 }
 
 //go:noinline
index 529c119dc3da5aea7d9b312dec7636b8f1781311..031d94f90cf1ffad38136b37d19135087ef0e5b2 100644 (file)
@@ -721,7 +721,6 @@ func (f *Func) ConstOffPtrSP(t *types.Type, c int64, sp *Value) *Value {
                v.AddArg(sp)
        }
        return v
-
 }
 
 func (f *Func) Frontend() Frontend                                  { return f.fe }
index ff3a1609c5a9952a000fbca82e78c4eeee385aa2..501f79eee1e2ddfd9648120ab0dbde0b98cb3e98 100644 (file)
@@ -70,7 +70,6 @@ func switch_ssa(a int) int {
                ret += 1
        }
        return ret
-
 }
 
 func fallthrough_ssa(a int) int {
@@ -92,7 +91,6 @@ func fallthrough_ssa(a int) int {
                ret++
        }
        return ret
-
 }
 
 func testFallthrough(t *testing.T) {
index 920e1c85fd4d7c6ba366d4aa2009ddd6ff8247b8..29d162596a3657d3f2d68c8ce4f1b8c91a45c8c7 100644 (file)
@@ -155,7 +155,6 @@ func Load(l *loader.Loader, arch *sys.Arch, localSymVersion int, input *bio.Read
                }
        }
        return textp, nil
-
 }
 
 // Convert symbol xcoff type to sym.SymKind
index e07ee0b208673da6db8a6d77a3755f5dfe517794..c76e267cc232843ef623075fbb54c9d0735f0c47 100644 (file)
@@ -103,5 +103,4 @@ func archinit(ctxt *ld.Link) {
 func adddynrel(target *ld.Target, ldr *loader.Loader, syms *ld.ArchSyms, s loader.Sym, r loader.Reloc, rIdx int) bool {
        ld.Exitf("adddynrel currently unimplemented for MIPS")
        return false
-
 }
index 91eef5e461660de17d2827f6e20d167203e74aee..09647d84b192e1268864b506885f3ab80ed1583d 100644 (file)
@@ -917,7 +917,6 @@ func xcoffreloc1(arch *sys.Arch, out *ld.OutBuf, ldr *loader.Loader, s loader.Sy
                emitReloc(ld.XCOFF_R_REF|0x3F<<8, 0)
        }
        return true
-
 }
 
 func elfreloc1(ctxt *ld.Link, out *ld.OutBuf, ldr *loader.Loader, s loader.Sym, r loader.ExtReloc, ri int, sectoff int64) bool {
index d1a8981e5e5706c9739d0dbc870758e2b815eb5e..cca5d15e07005f5ddbf58cfe76436f4155e3d73d 100644 (file)
@@ -203,7 +203,6 @@ func driverArgsConnLocked(ci driver.Conn, ds *driverStmt, args []any) ([]driver.
        }
 
        return nvargs, nil
-
 }
 
 // convertAssign is the same as convertAssignRows, but without the optional
index a3a944a05eb1d98d04cb67c2786cf3e7f11c88f7..29439e2c1dcea1f8a19dae2e44e3e398709cd606 100644 (file)
@@ -241,7 +241,6 @@ func (s *sum64) MarshalBinary() ([]byte, error) {
        b = append(b, magic64...)
        b = appendUint64(b, uint64(*s))
        return b, nil
-
 }
 
 func (s *sum64a) MarshalBinary() ([]byte, error) {
index bf67ceb9d7ab4dafa2049d12ea1200413e15041c..3e5a6849f7e34a274af4c9612fb4e3e34b5d918b 100644 (file)
@@ -482,7 +482,6 @@ func (m *Matcher) stack(w Writer) bool {
                }
        }
        return m.ShouldEnable(h)
-
 }
 
 // Writer is the same interface as io.Writer.
index 8f25fe9f64edb0a3f834be47e74e7790b407aca6..25de336a8041c4b4d686b82808093febfc27b31c 100644 (file)
@@ -24,5 +24,4 @@ func Fstatat(dirfd int, path string, stat *syscall.Stat_t, flags int) error {
        }
 
        return nil
-
 }
index f03aeec295cb08ea71fb2958d03c09812a1a09e5..4d21ee7990f9f285d8335a36e6cd40c801007b82 100644 (file)
@@ -145,7 +145,6 @@ func (l *Logger) WithGroup(name string) *Logger {
        c := l.clone()
        c.handler = l.handler.WithGroup(name)
        return c
-
 }
 
 // New creates a new Logger with the given non-nil Handler.
index 7d6bf034dff8103605f919eb003a2144fefd5167..bb045a0b48fceb04be9745d77afe027651ab881a 100644 (file)
@@ -194,13 +194,11 @@ func alike(x, y *Float) bool {
 func alike32(x, y float32) bool {
        // we can ignore NaNs
        return x == y && math.Signbit(float64(x)) == math.Signbit(float64(y))
-
 }
 
 func alike64(x, y float64) bool {
        // we can ignore NaNs
        return x == y && math.Signbit(x) == math.Signbit(y)
-
 }
 
 func TestFloatMantExp(t *testing.T) {
index 36a03f4a32db37f6b19746c9b37df72f822df878..924577859086454ec3f4cd6f96f24dc724f60c4a 100644 (file)
@@ -3812,7 +3812,6 @@ func numLeadingCRorLF(v []byte) (n int) {
                break
        }
        return
-
 }
 
 func strSliceContains(ss []string, s string) bool {
index 4cab2d4cdf6c8bc00cf2348f536c0ee19f5e686c..c0ee6b33f9f96ea8e0db810b2b4b3ffff76c7930 100644 (file)
@@ -542,7 +542,6 @@ func tempDir() string {
                dir = "/tmp"
        }
        return dir
-
 }
 
 // Chdir changes the current working directory to the file,
index 8af88d1832fa0eb025fc0ff426793087a8a58528..0d200792424daf604b11c068bd91ac2137ff4bc0 100644 (file)
@@ -428,7 +428,6 @@ func write1(fd uintptr, p unsafe.Pointer, n int32) int32 {
        }
        // Note that in this case we can't return a valid errno value.
        return write2(fd, uintptr(p), n)
-
 }
 
 //go:nosplit
@@ -641,7 +640,6 @@ func sysconf(name int32) uintptr {
                throw("syscall sysconf")
        }
        return r
-
 }
 
 // pthread functions returns its error code in the main return value
index 6f4a89df2befef3d5d03488ceff5dda4beff0996..afe1bdd298b994dff5486820260e7bdadcbd5ccd 100644 (file)
@@ -623,7 +623,6 @@ func reflect_resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer {
 //go:linkname reflect_resolveTextOff reflect.resolveTextOff
 func reflect_resolveTextOff(rtype unsafe.Pointer, off int32) unsafe.Pointer {
        return toRType((*_type)(rtype)).textOff(textOff(off))
-
 }
 
 // reflectlite_resolveNameOff resolves a name offset from a base pointer.
index e87d4d6d7acced85293cc084fe648a2fbe8e545e..7738fca602820af32a15c7051b5f9556255b5e62 100644 (file)
@@ -164,7 +164,6 @@ func syscall_exit(code uintptr) {
 func syscall_fcntl1(fd, cmd, arg uintptr) (val, err uintptr) {
        val, err = syscall3(&libc_fcntl, fd, cmd, arg)
        return
-
 }
 
 //go:linkname syscall_forkx syscall.forkx
index 88318782da02fd5d5509363805af77a421cd5a7a..8cbccac673ac6ce56d638e5279c2a5a39a11ba2e 100644 (file)
@@ -461,7 +461,6 @@ func testTracebackArgs2(a bool, b struct {
                return b.a + b.b + b.c + b.x[0] + b.x[1] + int(d[0]) + int(d[1]) + int(d[2])
        }
        return n
-
 }
 
 //go:noinline
index 47268225c8ca1cd4aef1f4cc5e4bd4c9d0543904..c36688825c200c2c415996b6a04b5944ce6a469d 100644 (file)
@@ -284,7 +284,6 @@ func (a *ActionNode) tree() *Tree {
 
 func (a *ActionNode) Copy() Node {
        return a.tr.newAction(a.Pos, a.Line, a.Pipe.CopyPipe())
-
 }
 
 // CommandNode holds a command (a pipeline inside an evaluating action).
index 67daf12d6237bb372771b2fcc5474fb914eac782..4b6c8b94b818ef45ff566e1e6bbb3bb8caeddeef 100644 (file)
@@ -382,7 +382,6 @@ func signextendAndMask8to64(a int8) (s, z uint64) {
        // ppc64x: -"MOVB", "ANDCC\t[$]247,"
        z = uint64(uint8(a)) & 0x3F7
        return
-
 }
 
 // Verify zero-extended values are not sign-extended under a bit mask (#61297)
@@ -392,7 +391,6 @@ func zeroextendAndMask8to64(a int8, b int16) (x, y uint64) {
        // ppc64x: -"MOVH\t", -"ANDCC", "MOVHZ"
        y = uint64(b) & 0xFFFF
        return
-
 }
 
 // Verify rotate and mask instructions, and further simplified instructions for small types
index db5c81f905beb73de1f4d36a6dd4bf09949e3613..6d6c33d947ef7bed80abbac2a7a4a4b6463c1ee9 100644 (file)
@@ -348,7 +348,6 @@ func reassoc_load_uint32(b []byte) uint32 {
 func extrashift_load_uint32(b []byte) uint32 {
        // amd64:`MOVL\s\([A-Z]+\)`,`SHLL\s[$]2`,-`MOV[BW]`,-`OR`
        return uint32(b[0])<<2 | uint32(b[1])<<10 | uint32(b[2])<<18 | uint32(b[3])<<26
-
 }
 
 func outoforder_load_uint32(b []byte) uint32 {
index 98ad0ece89db938ea51cf74b280c0a8431861d36..193f75b092eac37e818b95df98eaa4e600c6c2bd 100644 (file)
@@ -277,7 +277,6 @@ func shouldSignEXT(x int) int64 {
        ret += int64(int8(x & 0x1100000000000011))
 
        return ret
-
 }
 
 func noIntermediateExtension(a, b, c uint32) uint32 {
index 99f85914a32ed7caa1d3addaf444ff45e4b63ddf..3e5d11f88e1aba8fd8cba36a16dfb29b9efd426e 100644 (file)
@@ -397,7 +397,6 @@ func exprsw(i *int) *int { // ERROR "leaking param: i to result ~r0 level=0$"
                return nil
        }
        return nil
-
 }
 
 // assigning to an array element is like assigning to the array
index 350be65202c00b14b24ce9ad258842554a1d9268..26131521504cd45a0f99007b9560a867cb538fc6 100644 (file)
@@ -397,7 +397,6 @@ func exprsw(i *int) *int { // ERROR "leaking param: i to result ~r0 level=0$"
                return nil
        }
        return nil
-
 }
 
 // assigning to an array element is like assigning to the array
index 61e531701abcff474f53361554e212c81f3700de..09bc3a9ce036f6ccecd37b062839e6e91d2b734f 100644 (file)
@@ -12,5 +12,4 @@ func hashBytesRaw(b0, b1, b2, b3, b7 byte) uint64 {
 
 func doStuff(data []byte) uint64 {
        return hashBytesRaw(data[0], data[1], data[2], data[3], data[7])
-
 }
index 700a1046a9149db8b99e2806e9fd71b7e6199700..7cc9494b763c1d2fcdde1dcdceba77e6d693f597 100644 (file)
@@ -18,7 +18,6 @@ func (r EqFunc[T]) Eqv(a, b T) bool {
 
 func New[T any](f func(a, b T) bool) Eq[T] {
        return EqFunc[T](f)
-
 }
 
 func Equal(a, b []byte) bool {
index 3a7c71a711e2047ccb517a1a83259e779db65498..97cf4d254951a29988d715bec1af8787923943b0 100644 (file)
@@ -219,7 +219,6 @@ func (r ApplicativeFunctor2[H, HT, A1, A2, R]) ApOption(a Option[A1]) Applicativ
 func (r ApplicativeFunctor2[H, HT, A1, A2, R]) Ap(a A1) ApplicativeFunctor1[Cons[A1, H], A1, A2, R] {
 
        return r.ApOption(Some(a))
-
 }
 
 func Applicative2[A1, A2, R any](fn Func2[A1, A2, R]) ApplicativeFunctor2[Nil, Nil, A1, A2, R] {
index 0a385acd17c398175916072e6cab876b83e451b2..abebf6776613e219ab0a5d3bc06ef0e36981aa84 100644 (file)
@@ -25,7 +25,6 @@ func min[T IntLike](x, y T) T {
                return x
        }
        return y
-
 }
 
 // Min returns the minimum element of `nums`.