From 8f5755e76e8e39733c3c919e77cdc2757bac2751 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 25 Sep 2019 08:48:26 +0200 Subject: [PATCH] runtime: gofmt after CL 192937 CL 192937 introduced some changes which weren't properly gofmt'ed. Do so now. Change-Id: I2d2d57ea8a79fb41bc4ca59fa23f12198d615fd8 Reviewed-on: https://go-review.googlesource.com/c/go/+/196812 Run-TryBot: Tobias Klauser Reviewed-by: Ian Lance Taylor TryBot-Result: Gobot Gobot --- src/runtime/crash_test.go | 2 +- src/runtime/testdata/testprog/vdso.go | 38 +++++++++++++-------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/runtime/crash_test.go b/src/runtime/crash_test.go index c2cab7c813..89b55a8011 100644 --- a/src/runtime/crash_test.go +++ b/src/runtime/crash_test.go @@ -148,7 +148,7 @@ func TestVDSO(t *testing.T) { output := runTestProg(t, "testprog", "SignalInVDSO") want := "success\n" if output != want { - t.Fatalf("output:\n%s\n\nwanted:\n%s", output, want); + t.Fatalf("output:\n%s\n\nwanted:\n%s", output, want) } } diff --git a/src/runtime/testdata/testprog/vdso.go b/src/runtime/testdata/testprog/vdso.go index 6036f45bc8..ef92f48758 100644 --- a/src/runtime/testdata/testprog/vdso.go +++ b/src/runtime/testdata/testprog/vdso.go @@ -19,37 +19,37 @@ func init() { } func signalInVDSO() { - f, err := ioutil.TempFile("", "timeprofnow") - if err != nil { + f, err := ioutil.TempFile("", "timeprofnow") + if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(2) - } + } - if err := pprof.StartCPUProfile(f); err != nil { + if err := pprof.StartCPUProfile(f); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(2) - } + } - t0 := time.Now() - t1 := t0 - // We should get a profiling signal 100 times a second, - // so running for 1 second should be sufficient. - for t1.Sub(t0) < time.Second { - t1 = time.Now() - } + t0 := time.Now() + t1 := t0 + // We should get a profiling signal 100 times a second, + // so running for 1 second should be sufficient. + for t1.Sub(t0) < time.Second { + t1 = time.Now() + } - pprof.StopCPUProfile() + pprof.StopCPUProfile() - name := f.Name() - if err := f.Close(); err != nil { + name := f.Name() + if err := f.Close(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(2) - } + } - if err := os.Remove(name); err != nil { + if err := os.Remove(name); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(2) - } + } - fmt.Println("success"); + fmt.Println("success") }