]> Cypherpunks repositories - gostls13.git/commitdiff
all: run gofmt
authorIan Lance Taylor <iant@golang.org>
Mon, 13 Jan 2025 18:24:50 +0000 (10:24 -0800)
committerGopher Robot <gobot@golang.org>
Mon, 3 Feb 2025 17:55:31 +0000 (09:55 -0800)
Change-Id: I0af1903ed1e4f2bf4ea273847b024520c577ef6d
Reviewed-on: https://go-review.googlesource.com/c/go/+/642496
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>

src/cmd/internal/objabi/path_test.go
src/cmd/internal/pgo/deserialize.go
src/cmd/internal/pgo/pgo.go
src/cmd/internal/pgo/serialize_test.go
src/encoding/xml/xml_test.go
src/reflect/all_test.go
src/runtime/traceback_system_test.go

index 2f57882efad8b49f21ce591882d9a7a594d2b6e7..676f794292ab0dfcf8e9f6b55c1d15f753dcbaaf 100644 (file)
@@ -12,24 +12,24 @@ import (
 )
 
 var escapeTests = []struct {
-               Path    string
-               Escaped string
-       }{
-               {"foo/bar/v1", "foo/bar/v1"},
-               {"foo/bar/v.1", "foo/bar/v%2e1"},
-               {"f.o.o/b.a.r/v1", "f.o.o/b.a.r/v1"},
-               {"f.o.o/b.a.r/v.1", "f.o.o/b.a.r/v%2e1"},
-               {"f.o.o/b.a.r/v..1", "f.o.o/b.a.r/v%2e%2e1"},
-               {"f.o.o/b.a.r/v..1.", "f.o.o/b.a.r/v%2e%2e1%2e"},
-               {"f.o.o/b.a.r/v%1", "f.o.o/b.a.r/v%251"},
-               {"runtime", "runtime"},
-               {"sync/atomic", "sync/atomic"},
-               {"golang.org/x/tools/godoc", "golang.org/x/tools/godoc"},
-               {"foo.bar/baz.quux", "foo.bar/baz%2equux"},
-               {"", ""},
-               {"%foo%bar", "%25foo%25bar"},
-               {"\x01\x00\x7F☺", "%01%00%7f%e2%98%ba"},
-       }
+       Path    string
+       Escaped string
+}{
+       {"foo/bar/v1", "foo/bar/v1"},
+       {"foo/bar/v.1", "foo/bar/v%2e1"},
+       {"f.o.o/b.a.r/v1", "f.o.o/b.a.r/v1"},
+       {"f.o.o/b.a.r/v.1", "f.o.o/b.a.r/v%2e1"},
+       {"f.o.o/b.a.r/v..1", "f.o.o/b.a.r/v%2e%2e1"},
+       {"f.o.o/b.a.r/v..1.", "f.o.o/b.a.r/v%2e%2e1%2e"},
+       {"f.o.o/b.a.r/v%1", "f.o.o/b.a.r/v%251"},
+       {"runtime", "runtime"},
+       {"sync/atomic", "sync/atomic"},
+       {"golang.org/x/tools/godoc", "golang.org/x/tools/godoc"},
+       {"foo.bar/baz.quux", "foo.bar/baz%2equux"},
+       {"", ""},
+       {"%foo%bar", "%25foo%25bar"},
+       {"\x01\x00\x7F☺", "%01%00%7f%e2%98%ba"},
+}
 
 func TestPathToPrefix(t *testing.T) {
        for _, tc := range escapeTests {
index 4b075b8daf7fddb9903dff4b90732f0e7aa4fdbc..dd26da2aa9929b77f1a63d44621d8c7f62e03294 100644 (file)
@@ -8,8 +8,8 @@ import (
        "bufio"
        "fmt"
        "io"
-       "strings"
        "strconv"
+       "strings"
 )
 
 // IsSerialized returns true if r is a serialized Profile.
index 1d2cb880f744f82164dfae8b13253aebe33deb15..3a0e01e8c2771839f3af18abbc92534cf09b4110 100644 (file)
@@ -52,4 +52,3 @@ func emptyProfile() *Profile {
 func WeightInPercentage(value int64, total int64) float64 {
        return (float64(value) / float64(total)) * 100
 }
-
index b24163d1e29432bfa918087001f6d7e363c07a66..9aef67c3670467c88d714c9c5c1e5e01763cf8e8 100644 (file)
@@ -67,25 +67,25 @@ func TestRoundTrip(t *testing.T) {
                NamedEdgeMap: NamedEdgeMap{
                        ByWeight: []NamedCallEdge{
                                {
-                                       CallerName: "a",
-                                       CalleeName: "b",
+                                       CallerName:     "a",
+                                       CalleeName:     "b",
                                        CallSiteOffset: 14,
                                },
                                {
-                                       CallerName: "c",
-                                       CalleeName: "d",
+                                       CallerName:     "c",
+                                       CalleeName:     "d",
                                        CallSiteOffset: 15,
                                },
                        },
                        Weight: map[NamedCallEdge]int64{
                                {
-                                       CallerName: "a",
-                                       CalleeName: "b",
+                                       CallerName:     "a",
+                                       CalleeName:     "b",
                                        CallSiteOffset: 14,
                                }: 2,
                                {
-                                       CallerName: "c",
-                                       CalleeName: "d",
+                                       CallerName:     "c",
+                                       CalleeName:     "d",
                                        CallSiteOffset: 15,
                                }: 1,
                        },
@@ -157,8 +157,8 @@ func constructFuzzProfile(t *testing.T, b []byte) *Profile {
                }
 
                edge := NamedCallEdge{
-                       CallerName: caller,
-                       CalleeName: callee,
+                       CallerName:     caller,
+                       CalleeName:     callee,
                        CallSiteOffset: int(line),
                }
 
index fc3c15eff1b689c6ed53ae74dcda034db6956923..10cefa068fec87ef2b4dadcbd5332c2a6ff97339 100644 (file)
@@ -640,11 +640,11 @@ func TestIssue68387(t *testing.T) {
        if tok3, err = dec.RawToken(); err != io.EOF || tok3 != nil {
                t.Fatalf("Missed EOF")
        }
-       s := StartElement{Name{"", "item"}, []Attr{Attr{Name{"","b"}, "]]>"}}}
+       s := StartElement{Name{"", "item"}, []Attr{Attr{Name{"", "b"}, "]]>"}}}
        if !reflect.DeepEqual(tok1.(StartElement), s) {
                t.Error("Wrong start element")
        }
-       e := EndElement{Name{"","item"}}
+       e := EndElement{Name{"", "item"}}
        if tok2.(EndElement) != e {
                t.Error("Wrong end element")
        }
index b2f70c13697735b57db701ab25ba305f53d2cca1..3d1e410dac632326075d00fe07e332ad491b92a7 100644 (file)
@@ -6322,12 +6322,12 @@ func TestMapOfGCBigKey(t *testing.T) {
        const n = 100
        m := MakeMap(mt)
        for i := 0; i < n; i++ {
-               kv := KV{int64(i), int64(i+1)}
+               kv := KV{int64(i), int64(i + 1)}
                m.SetMapIndex(ValueOf(kv), ValueOf(kv))
        }
 
        for i := 0; i < n; i++ {
-               kv := KV{int64(i), int64(i+1)}
+               kv := KV{int64(i), int64(i + 1)}
                elem := m.MapIndex(ValueOf(kv)).Interface().(KV)
                if elem != kv {
                        t.Errorf("lost m[%v] = %v, want %v", kv, elem, kv)
index af20f54a0946fcbaef69add7e55c6ff3d019715c..3a3f33bbd41005a9706d6d7286204f0bf835e327 100644 (file)
@@ -129,7 +129,7 @@ func TestTracebackSystem(t *testing.T) {
                t.Skip("Can't read source code for this file on Android")
        }
 
-       tests := []struct{
+       tests := []struct {
                name string
                want string
        }{
@@ -326,7 +326,7 @@ func parseStackPCs(crash string) ([]uintptr, error) {
                                continue
                        }
 
-                       pc = pc-parentSentinel+childSentinel
+                       pc = pc - parentSentinel + childSentinel
 
                        // If the previous frame was sigpanic, then this frame
                        // was a trap (e.g., SIGSEGV).