]> Cypherpunks repositories - gostls13.git/commitdiff
all: run gofmt
authorPrajwal Koirala <16564273+Prajwal-Koirala@users.noreply.github.com>
Mon, 15 Mar 2021 06:13:23 +0000 (06:13 +0000)
committerIan Lance Taylor <iant@golang.org>
Mon, 15 Mar 2021 21:49:19 +0000 (21:49 +0000)
Fixes #44980

Change-Id: Icef35319d1582d8367c8911e15d11b0224957327
GitHub-Last-Rev: 2113e97e837c1ef5de9ba6a7bd62db92e644c500
GitHub-Pull-Request: golang/go#45005
Reviewed-on: https://go-review.googlesource.com/c/go/+/301632
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Josh Bleecher Snyder <josharian@gmail.com>

misc/cgo/testplugin/testdata/method2/main.go
src/cmd/compile/internal/ssa/gen/S390XOps.go
src/cmd/cover/testdata/toolexec.go
src/cmd/go/testdata/addmod.go
src/cmd/internal/obj/riscv/testdata/testbranch/branch_test.go
src/cmd/link/internal/ld/elf.go
src/cmd/link/internal/ld/testdata/deadcode/ifacemethod3.go
src/runtime/testdata/testwinsignal/main.go

index 6a87e7b6a0fe0d83cc1f87c7ae2b93d1d9cb71c3..89afbda3d479af1e0c3f520bbd000c973d9af2dd 100644 (file)
@@ -15,7 +15,7 @@ import (
 
 var t p.T
 
-type I interface { M() }
+type I interface{ M() }
 
 func main() {
        pl, err := plugin.Open("method2.so")
index 1ddad1febdbb342ed7e4d012f5ab0ac5691d2302..5b33ba710e9818799df21ca130049381ced03c5b 100644 (file)
@@ -381,7 +381,7 @@ func init() {
                {name: "NOT", argLength: 1, reg: gp11, resultInArg0: true, clobberFlags: true},  // ^arg0
                {name: "NOTW", argLength: 1, reg: gp11, resultInArg0: true, clobberFlags: true}, // ^arg0
 
-               {name: "FSQRT", argLength: 1, reg: fp11, asm: "FSQRT"}, // sqrt(arg0)
+               {name: "FSQRT", argLength: 1, reg: fp11, asm: "FSQRT"},   // sqrt(arg0)
                {name: "FSQRTS", argLength: 1, reg: fp11, asm: "FSQRTS"}, // sqrt(arg0), float32
 
                // Conditional register-register moves.
index 386de79038a355c2de01fead816a1410479490f8..458adaeaaa53696e09b04686c0515b419aaa1fff 100644 (file)
@@ -15,8 +15,8 @@
 package main
 
 import (
-       "os"
        exec "internal/execabs"
+       "os"
        "strings"
 )
 
index 09fc8e713bcbcfbc9ad226567369df1f2387d446..03869e68defe0845c5cbdef60fa08f2fd3fdf42d 100644 (file)
@@ -22,10 +22,10 @@ import (
        "bytes"
        "flag"
        "fmt"
+       exec "internal/execabs"
        "io/fs"
        "log"
        "os"
-       exec "internal/execabs"
        "path/filepath"
        "strings"
 
index 3fa95222ffd33fc3d0217a67e358dca7dce55597..de412c64a7832b4ab4dfed9c87dd25d446a25d0d 100644 (file)
@@ -25,13 +25,13 @@ func testBLTU(a, b int64) (r bool)
 func testBLTZ(a int64) (r bool)
 func testBNEZ(a int64) (r bool)
 
-func testGoBGE(a, b int64) bool { return a >= b }
+func testGoBGE(a, b int64) bool  { return a >= b }
 func testGoBGEU(a, b int64) bool { return uint64(a) >= uint64(b) }
-func testGoBGT(a, b int64) bool { return a > b }
+func testGoBGT(a, b int64) bool  { return a > b }
 func testGoBGTU(a, b int64) bool { return uint64(a) > uint64(b) }
-func testGoBLE(a, b int64) bool { return a <= b }
+func testGoBLE(a, b int64) bool  { return a <= b }
 func testGoBLEU(a, b int64) bool { return uint64(a) <= uint64(b) }
-func testGoBLT(a, b int64) bool { return a < b }
+func testGoBLT(a, b int64) bool  { return a < b }
 func testGoBLTZ(a, b int64) bool { return uint64(a) < uint64(b) }
 
 func TestBranchCondition(t *testing.T) {
index d3e598b31265da947f608ed0666012d593a9e916..b4af0931ccc892d7e19693aca86e334d770fd3de 100644 (file)
@@ -522,22 +522,22 @@ func elfwriteinterp(out *OutBuf) int {
 // member of .gnu.attributes of MIPS for fpAbi
 const (
        // No floating point is present in the module (default)
-       MIPS_FPABI_NONE    = 0
+       MIPS_FPABI_NONE = 0
        // FP code in the module uses the FP32 ABI for a 32-bit ABI
-       MIPS_FPABI_ANY     = 1
+       MIPS_FPABI_ANY = 1
        // FP code in the module only uses single precision ABI
-       MIPS_FPABI_SINGLE  = 2
+       MIPS_FPABI_SINGLE = 2
        // FP code in the module uses soft-float ABI
-       MIPS_FPABI_SOFT    = 3
+       MIPS_FPABI_SOFT = 3
        // FP code in the module assumes an FPU with FR=1 and has 12
        // callee-saved doubles. Historic, no longer supported.
-       MIPS_FPABI_HIST    = 4
+       MIPS_FPABI_HIST = 4
        // FP code in the module uses the FPXX  ABI
-       MIPS_FPABI_FPXX    = 5
+       MIPS_FPABI_FPXX = 5
        // FP code in the module uses the FP64  ABI
-       MIPS_FPABI_FP64    = 6
+       MIPS_FPABI_FP64 = 6
        // FP code in the module uses the FP64A ABI
-       MIPS_FPABI_FP64A   = 7
+       MIPS_FPABI_FP64A = 7
 )
 
 func elfMipsAbiFlags(sh *ElfShdr, startva uint64, resoff uint64) int {
@@ -585,7 +585,7 @@ func elfWriteMipsAbiFlags(ctxt *Link) int {
        ctxt.Out.Write8(1)  // cpr1Size
        ctxt.Out.Write8(0)  // cpr2Size
        if objabi.GOMIPS == "softfloat" {
-               ctxt.Out.Write8(MIPS_FPABI_SOFT)  // fpAbi
+               ctxt.Out.Write8(MIPS_FPABI_SOFT) // fpAbi
        } else {
                // Go cannot make sure non odd-number-fpr is used (ie, in load a double from memory).
                // So, we mark the object is MIPS I style paired float/double register scheme,
@@ -594,12 +594,12 @@ func elfWriteMipsAbiFlags(ctxt *Link) int {
                // Note: MIPS_FPABI_ANY is bad naming: in fact it is MIPS I style FPR usage.
                //       It is not for 'ANY'.
                // TODO: switch to FPXX after be sure that no odd-number-fpr is used.
-               ctxt.Out.Write8(MIPS_FPABI_ANY)   // fpAbi
+               ctxt.Out.Write8(MIPS_FPABI_ANY) // fpAbi
        }
-       ctxt.Out.Write32(0)  // isaExt
-       ctxt.Out.Write32(0)  // ases
-       ctxt.Out.Write32(0)  // flags1
-       ctxt.Out.Write32(0)  // flags2
+       ctxt.Out.Write32(0) // isaExt
+       ctxt.Out.Write32(0) // ases
+       ctxt.Out.Write32(0) // flags1
+       ctxt.Out.Write32(0) // flags2
        return int(sh.Size)
 }
 
@@ -1538,7 +1538,6 @@ func (ctxt *Link) doelf() {
                addgonote(ctxt, ".note.go.buildid", ELF_NOTE_GOBUILDID_TAG, []byte(*flagBuildid))
        }
 
-
        //type mipsGnuAttributes struct {
        //      version uint8   // 'A'
        //      length  uint32  // 15 including itself
@@ -1552,12 +1551,12 @@ func (ctxt *Link) doelf() {
                gnuattributes := ldr.CreateSymForUpdate(".gnu.attributes", 0)
                gnuattributes.SetType(sym.SELFROSECT)
                gnuattributes.SetReachable(true)
-               gnuattributes.AddUint8('A')  // version 'A'
-               gnuattributes.AddUint32(ctxt.Arch, 15) // length 15 including itself
+               gnuattributes.AddUint8('A')               // version 'A'
+               gnuattributes.AddUint32(ctxt.Arch, 15)    // length 15 including itself
                gnuattributes.AddBytes([]byte("gnu\x00")) // "gnu\0"
-               gnuattributes.AddUint8(1) // 1:file, 2: section, 3: symbol, 1 here
-               gnuattributes.AddUint32(ctxt.Arch, 7) // tag length, including tag, 7 here
-               gnuattributes.AddUint8(4) // 4 for FP, 8 for MSA
+               gnuattributes.AddUint8(1)                 // 1:file, 2: section, 3: symbol, 1 here
+               gnuattributes.AddUint32(ctxt.Arch, 7)     // tag length, including tag, 7 here
+               gnuattributes.AddUint8(4)                 // 4 for FP, 8 for MSA
                if objabi.GOMIPS == "softfloat" {
                        gnuattributes.AddUint8(MIPS_FPABI_SOFT)
                } else {
index 9a8dfbce5facba86bf038d5c690b3c3f73156a2c..37c89374cbebf8c2685fbec59411a9aa9be4eb11 100644 (file)
@@ -14,7 +14,7 @@ type S int
 
 func (s S) M() { println("S.M") }
 
-type I interface { M() }
+type I interface{ M() }
 
 type T float64
 
index d8cd884ffac638cf5ff077915e804bc178fd51af..1e7c9475fd663153b941f1075ed8828feb791fb7 100644 (file)
@@ -1,19 +1,19 @@
-package main\r
-\r
-import (\r
-       "fmt"\r
-       "os"\r
-       "os/signal"\r
-       "time"\r
-)\r
-\r
-func main() {\r
-       c := make(chan os.Signal, 1)\r
-       signal.Notify(c)\r
-\r
-       fmt.Println("ready")\r
-       sig := <-c\r
-\r
-       time.Sleep(time.Second)\r
-       fmt.Println(sig)\r
-}\r
+package main
+
+import (
+       "fmt"
+       "os"
+       "os/signal"
+       "time"
+)
+
+func main() {
+       c := make(chan os.Signal, 1)
+       signal.Notify(c)
+
+       fmt.Println("ready")
+       sig := <-c
+
+       time.Sleep(time.Second)
+       fmt.Println(sig)
+}