]> Cypherpunks.ru repositories - gostls13.git/commitdiff
runtime, time: gofmt
authorTobias Klauser <tklauser@distanz.ch>
Tue, 26 May 2020 13:58:13 +0000 (15:58 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Tue, 26 May 2020 22:06:26 +0000 (22:06 +0000)
Change-Id: Ib36a5f239db5af497aae122eba049c15d0d4c4a8
Reviewed-on: https://go-review.googlesource.com/c/go/+/235139
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/sizeof_test.go
src/runtime/testdata/testprog/lockosthread.go
src/time/example_test.go

index d6156902c187fbe525380651a7e39ea074220ca1..736e848f8cbc52e9a50a919bb3468975d2abe648 100644 (file)
@@ -21,7 +21,7 @@ func TestSizeof(t *testing.T) {
                _32bit uintptr     // size on 32bit platforms
                _64bit uintptr     // size on 64bit platforms
        }{
-               {runtime.G{}, 216, 376}, // g, but exported for testing
+               {runtime.G{}, 216, 376},   // g, but exported for testing
                {runtime.Sudog{}, 56, 88}, // sudog, but exported for testing
        }
 
index 098cc4dd722e659d5d97d0ea6a326d2efc893e8d..e9d7fdbc44a0cc9ce0dca8f4d2f7a557effc2ab8 100644 (file)
@@ -220,7 +220,7 @@ func LockOSThreadTemplateThreadRace() {
        }()
 
        // Try to synchronize both LockOSThreads.
-       start := time.Now().Add(10*time.Millisecond)
+       start := time.Now().Add(10 * time.Millisecond)
 
        var wg sync.WaitGroup
        wg.Add(2)
@@ -232,10 +232,10 @@ func LockOSThreadTemplateThreadRace() {
 
                        // Add work to the local runq to trigger early startm
                        // in handoffp.
-                       go func(){}()
+                       go func() {}()
 
                        runtime.LockOSThread()
-                       runtime.Gosched()  // add a preemption point.
+                       runtime.Gosched() // add a preemption point.
                        wg.Done()
                }()
        }
index 0f9b87494404e3306e99dc0a0d58ee80c4846ef4..0afb18aba6b4e5beb9233d54156966cb66cccfca 100644 (file)
@@ -51,7 +51,7 @@ func ExampleDuration_Round() {
 
 func ExampleDuration_String() {
        fmt.Println(1*time.Hour + 2*time.Minute + 300*time.Millisecond)
-       fmt.Println(300*time.Millisecond)
+       fmt.Println(300 * time.Millisecond)
        // Output:
        // 1h2m0.3s
        // 300ms