]> Cypherpunks repositories - gostls13.git/commitdiff
all: run go fmt
authorsivchari <shibuuuu5@gmail.com>
Mon, 26 Feb 2024 05:59:15 +0000 (14:59 +0900)
committerGopher Robot <gobot@golang.org>
Wed, 28 Feb 2024 20:35:05 +0000 (20:35 +0000)
I ran go fmt to fix format on the entire repository.

Change-Id: I2f09166b6b8ba0ffb0ba27f6500efb0ea4cf21ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/566835
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>

src/internal/buildcfg/cfg.go
src/internal/chacha8rand/chacha8.go
src/maps/maps.go
src/net/dnsclient.go
src/runtime/mgc.go
src/runtime/rand.go
src/runtime/rwmutex.go
src/sync/pool.go

index ac731f0e997e5edea77bf4021c2758722e1e5e67..61810f1348258ea3b2c6742eee20e5684037af7f 100644 (file)
@@ -20,20 +20,20 @@ import (
 )
 
 var (
-       GOROOT   = os.Getenv("GOROOT") // cached for efficiency
-       GOARCH   = envOr("GOARCH", defaultGOARCH)
-       GOOS     = envOr("GOOS", defaultGOOS)
-       GO386    = envOr("GO386", defaultGO386)
-       GOAMD64  = goamd64()
-       GOARM    = goarm()
-       GOMIPS   = gomips()
-       GOMIPS64 = gomips64()
-       GOPPC64  = goppc64()
+       GOROOT    = os.Getenv("GOROOT") // cached for efficiency
+       GOARCH    = envOr("GOARCH", defaultGOARCH)
+       GOOS      = envOr("GOOS", defaultGOOS)
+       GO386     = envOr("GO386", defaultGO386)
+       GOAMD64   = goamd64()
+       GOARM     = goarm()
+       GOMIPS    = gomips()
+       GOMIPS64  = gomips64()
+       GOPPC64   = goppc64()
        GORISCV64 = goriscv64()
-       GOWASM   = gowasm()
-       ToolTags = toolTags()
-       GO_LDSO  = defaultGO_LDSO
-       Version  = version
+       GOWASM    = gowasm()
+       ToolTags  = toolTags()
+       GO_LDSO   = defaultGO_LDSO
+       Version   = version
 )
 
 // Error is one of the errors found (if any) in the build configuration.
index ce55c07d058ad538a0c1d972f62b79ef1d14bded..0e601c23ac17038efc5a00101f63e1fc3dc8699a 100644 (file)
@@ -37,6 +37,7 @@ type State struct {
 //
 // Next is //go:nosplit to allow its use in the runtime
 // with per-m data without holding the per-m lock.
+//
 //go:nosplit
 func (s *State) Next() (uint64, bool) {
        i := s.i
index 82b348c2f34c2b10033466fe73a16a697b91fd5c..c92106710d2e2245987fd67f255184228a2209c2 100644 (file)
@@ -38,6 +38,7 @@ func EqualFunc[M1 ~map[K]V1, M2 ~map[K]V2, K comparable, V1, V2 any](m1 M1, m2 M
 }
 
 // clone is implemented in the runtime package.
+//
 //go:linkname clone maps.clone
 func clone(m any) any
 
index 204620b2edb8d0480d9aea392dfdaa580eca2992..2b4cb4f3bafa94e300af03eac9d17182e29a66f2 100644 (file)
@@ -14,6 +14,7 @@ import (
 )
 
 // provided by runtime
+//
 //go:linkname runtime_rand runtime.rand
 func runtime_rand() uint64
 
index b6c241f141a45a73f743547adb5b8816c7b8de6c..64fc0a688cb79e8cedd20f20e4efca80b3dd980c 100644 (file)
@@ -378,7 +378,7 @@ type workType struct {
        // markDoneSema protects transitions from mark to mark termination.
        markDoneSema uint32
 
-       bgMarkDone  uint32 // cas to 1 when at a background mark completion point
+       bgMarkDone uint32 // cas to 1 when at a background mark completion point
        // Background mark completion signaling
 
        // mode is the concurrency mode of the current GC cycle.
index 10cd116fadeaaf7188f8d50e80e40f8528482977..62577dda91c6c6087a28000b4ade2ba8001d085f 100644 (file)
@@ -115,6 +115,7 @@ func bootstrapRandReseed() {
 }
 
 // rand32 is uint32(rand()), called from compiler-generated code.
+//
 //go:nosplit
 func rand32() uint32 {
        return uint32(rand())
@@ -122,6 +123,7 @@ func rand32() uint32 {
 
 // rand returns a random uint64 from the per-m chacha8 state.
 // Do not change signature: used via linkname from other packages.
+//
 //go:nosplit
 //go:linkname rand
 func rand() uint64 {
@@ -159,6 +161,7 @@ func mrandinit(mp *m) {
 
 // randn is like rand() % n but faster.
 // Do not change signature: used via linkname from other packages.
+//
 //go:nosplit
 //go:linkname randn
 func randn(n uint32) uint32 {
@@ -174,6 +177,7 @@ func randn(n uint32) uint32 {
 // cheaprand must not be exported to other packages:
 // the rule is that other packages using runtime-provided
 // randomness must always use rand.
+//
 //go:nosplit
 func cheaprand() uint32 {
        mp := getg().m
@@ -208,6 +212,7 @@ func cheaprand() uint32 {
 // cheaprand64 must not be exported to other packages:
 // the rule is that other packages using runtime-provided
 // randomness must always use rand.
+//
 //go:nosplit
 func cheaprand64() int64 {
        return int64(cheaprand())<<31 ^ int64(cheaprand())
@@ -218,6 +223,7 @@ func cheaprand64() int64 {
 // cheaprandn must not be exported to other packages:
 // the rule is that other packages using runtime-provided
 // randomness must always use randn.
+//
 //go:nosplit
 func cheaprandn(n uint32) uint32 {
        // See https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/
index 34d8f675c1798525af797e7b4ad2c465b01e7cfc..bf3b9a1caeae5f92928035123184cd5bb67e8579 100644 (file)
@@ -26,7 +26,7 @@ type rwmutex struct {
        readerCount atomic.Int32 // number of pending readers
        readerWait  atomic.Int32 // number of departing readers
 
-       readRank  lockRank // semantic lock rank for read locking
+       readRank lockRank // semantic lock rank for read locking
 }
 
 // Lock ranking an rwmutex has two aspects:
@@ -50,13 +50,13 @@ type rwmutex struct {
 // acquire of readRank for the duration of a read lock.
 //
 // The lock ranking must document this ordering:
-// - readRankInternal is a leaf lock.
-// - readRank is taken before readRankInternal.
-// - writeRank is taken before readRankInternal.
-// - readRank is placed in the lock order wherever a read lock of this rwmutex
-//   belongs.
-// - writeRank is placed in the lock order wherever a write lock of this
-//   rwmutex belongs.
+//   - readRankInternal is a leaf lock.
+//   - readRank is taken before readRankInternal.
+//   - writeRank is taken before readRankInternal.
+//   - readRank is placed in the lock order wherever a read lock of this rwmutex
+//     belongs.
+//   - writeRank is placed in the lock order wherever a write lock of this
+//     rwmutex belongs.
 func (rw *rwmutex) init(readRank, readRankInternal, writeRank lockRank) {
        rw.readRank = readRank
 
index 5f8cffa8bf1cbf953821a2eba1064a8ac08778ed..e0948499744b476ab6a1def0503364ca1bc335a5 100644 (file)
@@ -76,6 +76,7 @@ type poolLocal struct {
 }
 
 // from runtime
+//
 //go:linkname runtime_randn runtime.randn
 func runtime_randn(n uint32) uint32