]> Cypherpunks repositories - gostls13.git/commitdiff
src, misc: apply gofmt
authorRobert Griesemer <gri@golang.org>
Thu, 14 Feb 2019 01:00:36 +0000 (17:00 -0800)
committerRobert Griesemer <gri@golang.org>
Tue, 19 Feb 2019 20:38:28 +0000 (20:38 +0000)
This applies the new gofmt literal normalizations to the library.

Change-Id: I8c1e8ef62eb556fc568872c9f77a31ef236348e7
Reviewed-on: https://go-review.googlesource.com/c/162539
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/archive/tar/strconv.go
src/archive/tar/strconv_test.go
src/cmd/compile/internal/gc/testdata/fp_test.go
src/cmd/vendor/golang.org/x/sys/windows/security_windows.go
src/compress/flate/deflate_test.go
src/go/internal/gcimporter/testdata/exports.go
src/math/cmplx/tan.go
src/math/sin.go
src/math/sincos.go
src/math/tan.go
src/math/tanh.go

index d144485a492496def9c647d2ecdfe9674b06cd72..0a910f33b9d68746e19992bf66bcb2091410b0cf 100644 (file)
@@ -244,7 +244,7 @@ func formatPAXTime(ts time.Time) (s string) {
        if secs < 0 {
                sign = "-"             // Remember sign
                secs = -(secs + 1)     // Add a second to secs
-               nsecs = -(nsecs - 1E9) // Take that second away from nsecs
+               nsecs = -(nsecs - 1e9) // Take that second away from nsecs
        }
        return strings.TrimRight(fmt.Sprintf("%s%d.%09d", sign, secs, nsecs), "0")
 }
index 4cc388cb0f269b88268c3f283f09d86a966dc626..dd3505a758af8d5d17ceae4ecd1c11652952f6b0 100644 (file)
@@ -303,27 +303,27 @@ func TestFormatPAXTime(t *testing.T) {
                {1350244992, 300000000, "1350244992.3"},
                {1350244992, 23960100, "1350244992.0239601"},
                {1350244992, 23960108, "1350244992.023960108"},
-               {+1, +1E9 - 1E0, "1.999999999"},
-               {+1, +1E9 - 1E3, "1.999999"},
-               {+1, +1E9 - 1E6, "1.999"},
-               {+1, +0E0 - 0E0, "1"},
-               {+1, +1E6 - 0E0, "1.001"},
-               {+1, +1E3 - 0E0, "1.000001"},
-               {+1, +1E0 - 0E0, "1.000000001"},
-               {0, 1E9 - 1E0, "0.999999999"},
-               {0, 1E9 - 1E3, "0.999999"},
-               {0, 1E9 - 1E6, "0.999"},
-               {0, 0E0, "0"},
-               {0, 1E6 + 0E0, "0.001"},
-               {0, 1E3 + 0E0, "0.000001"},
-               {0, 1E0 + 0E0, "0.000000001"},
-               {-1, -1E9 + 1E0, "-1.999999999"},
-               {-1, -1E9 + 1E3, "-1.999999"},
-               {-1, -1E9 + 1E6, "-1.999"},
-               {-1, -0E0 + 0E0, "-1"},
-               {-1, -1E6 + 0E0, "-1.001"},
-               {-1, -1E3 + 0E0, "-1.000001"},
-               {-1, -1E0 + 0E0, "-1.000000001"},
+               {+1, +1e9 - 1e0, "1.999999999"},
+               {+1, +1e9 - 1e3, "1.999999"},
+               {+1, +1e9 - 1e6, "1.999"},
+               {+1, +0e0 - 0e0, "1"},
+               {+1, +1e6 - 0e0, "1.001"},
+               {+1, +1e3 - 0e0, "1.000001"},
+               {+1, +1e0 - 0e0, "1.000000001"},
+               {0, 1e9 - 1e0, "0.999999999"},
+               {0, 1e9 - 1e3, "0.999999"},
+               {0, 1e9 - 1e6, "0.999"},
+               {0, 0e0, "0"},
+               {0, 1e6 + 0e0, "0.001"},
+               {0, 1e3 + 0e0, "0.000001"},
+               {0, 1e0 + 0e0, "0.000000001"},
+               {-1, -1e9 + 1e0, "-1.999999999"},
+               {-1, -1e9 + 1e3, "-1.999999"},
+               {-1, -1e9 + 1e6, "-1.999"},
+               {-1, -0e0 + 0e0, "-1"},
+               {-1, -1e6 + 0e0, "-1.001"},
+               {-1, -1e3 + 0e0, "-1.000001"},
+               {-1, -1e0 + 0e0, "-1.000000001"},
                {-1350244992, 0, "-1350244992"},
                {-1350244992, -300000000, "-1350244992.3"},
                {-1350244992, -23960100, "-1350244992.0239601"},
index daed2b417ad084894a72e90b990996617c03f567..7d61a8063ee9a97e54de3c28c662a0d31d9cf1c2 100644 (file)
@@ -179,7 +179,7 @@ func integer2floatConversions(t *testing.T) {
        }
        {
                // Check maximum values
-               a, b, c, d, e, f, g, h, i := conv2Float64_ssa(127, 255, 32767, 65535, 0x7fffffff, 0xffffffff, 0x7fffFFFFffffFFFF, 0xffffFFFFffffFFFF, 3.402823E38)
+               a, b, c, d, e, f, g, h, i := conv2Float64_ssa(127, 255, 32767, 65535, 0x7fffffff, 0xffffffff, 0x7fffFFFFffffFFFF, 0xffffFFFFffffFFFF, 3.402823e38)
                expect64(t, "a", a, 127)
                expect64(t, "b", b, 255)
                expect64(t, "c", c, 32767)
@@ -188,11 +188,11 @@ func integer2floatConversions(t *testing.T) {
                expect64(t, "f", f, float64(uint32(0xffffffff)))
                expect64(t, "g", g, float64(int64(0x7fffffffffffffff)))
                expect64(t, "h", h, float64(uint64(0xffffffffffffffff)))
-               expect64(t, "i", i, float64(float32(3.402823E38)))
+               expect64(t, "i", i, float64(float32(3.402823e38)))
        }
        {
                // Check minimum values (and tweaks for unsigned)
-               a, b, c, d, e, f, g, h, i := conv2Float64_ssa(-128, 254, -32768, 65534, ^0x7fffffff, 0xfffffffe, ^0x7fffFFFFffffFFFF, 0xffffFFFFffffF401, 1.5E-45)
+               a, b, c, d, e, f, g, h, i := conv2Float64_ssa(-128, 254, -32768, 65534, ^0x7fffffff, 0xfffffffe, ^0x7fffFFFFffffFFFF, 0xffffFFFFffffF401, 1.5e-45)
                expect64(t, "a", a, -128)
                expect64(t, "b", b, 254)
                expect64(t, "c", c, -32768)
@@ -201,11 +201,11 @@ func integer2floatConversions(t *testing.T) {
                expect64(t, "f", f, float64(uint32(0xfffffffe)))
                expect64(t, "g", g, float64(^int64(0x7fffffffffffffff)))
                expect64(t, "h", h, float64(uint64(0xfffffffffffff401)))
-               expect64(t, "i", i, float64(float32(1.5E-45)))
+               expect64(t, "i", i, float64(float32(1.5e-45)))
        }
        {
                // Check maximum values
-               a, b, c, d, e, f, g, h, i := conv2Float32_ssa(127, 255, 32767, 65535, 0x7fffffff, 0xffffffff, 0x7fffFFFFffffFFFF, 0xffffFFFFffffFFFF, 3.402823E38)
+               a, b, c, d, e, f, g, h, i := conv2Float32_ssa(127, 255, 32767, 65535, 0x7fffffff, 0xffffffff, 0x7fffFFFFffffFFFF, 0xffffFFFFffffFFFF, 3.402823e38)
                expect32(t, "a", a, 127)
                expect32(t, "b", b, 255)
                expect32(t, "c", c, 32767)
@@ -214,11 +214,11 @@ func integer2floatConversions(t *testing.T) {
                expect32(t, "f", f, float32(uint32(0xffffffff)))
                expect32(t, "g", g, float32(int64(0x7fffffffffffffff)))
                expect32(t, "h", h, float32(uint64(0xffffffffffffffff)))
-               expect32(t, "i", i, float32(float64(3.402823E38)))
+               expect32(t, "i", i, float32(float64(3.402823e38)))
        }
        {
                // Check minimum values (and tweaks for unsigned)
-               a, b, c, d, e, f, g, h, i := conv2Float32_ssa(-128, 254, -32768, 65534, ^0x7fffffff, 0xfffffffe, ^0x7fffFFFFffffFFFF, 0xffffFFFFffffF401, 1.5E-45)
+               a, b, c, d, e, f, g, h, i := conv2Float32_ssa(-128, 254, -32768, 65534, ^0x7fffffff, 0xfffffffe, ^0x7fffFFFFffffFFFF, 0xffffFFFFffffF401, 1.5e-45)
                expect32(t, "a", a, -128)
                expect32(t, "b", b, 254)
                expect32(t, "c", c, -32768)
@@ -227,7 +227,7 @@ func integer2floatConversions(t *testing.T) {
                expect32(t, "f", f, float32(uint32(0xfffffffe)))
                expect32(t, "g", g, float32(^int64(0x7fffffffffffffff)))
                expect32(t, "h", h, float32(uint64(0xfffffffffffff401)))
-               expect32(t, "i", i, float32(float64(1.5E-45)))
+               expect32(t, "i", i, float32(float64(1.5e-45)))
        }
 }
 
@@ -1685,7 +1685,7 @@ func TestFP(t *testing.T) {
        c := float32(3.0)
        d := float32(4.0)
 
-       tiny := float32(1.5E-45) // smallest f32 denorm = 2**(-149)
+       tiny := float32(1.5e-45) // smallest f32 denorm = 2**(-149)
        dtiny := float64(tiny)   // well within range of f64
 
        fail64("+", add64_ssa, a, b, 7.0)
index 4f17a3331fd04ab731533f1ee0b5bba6e4b323e8..9f946da6fe5e216f5efb0fd9b7eb36de3c1057e2 100644 (file)
@@ -149,7 +149,7 @@ const (
        DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS           = 0x22b
        DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS      = 0x22c
        DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = 0x22d
-       DOMAIN_ALIAS_RID_MONITORING_USERS               = 0X22e
+       DOMAIN_ALIAS_RID_MONITORING_USERS               = 0x22e
        DOMAIN_ALIAS_RID_LOGGING_USERS                  = 0x22f
        DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS            = 0x230
        DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS             = 0x231
index 831be2198cadbef19c3904eebb401fec2654911d..079c03c28352f45419b76eb0e760f227324dea1b 100644 (file)
@@ -161,7 +161,7 @@ func TestVeryLongSparseChunk(t *testing.T) {
                t.Errorf("NewWriter: %v", err)
                return
        }
-       if _, err = io.Copy(w, &sparseReader{l: 23E8}); err != nil {
+       if _, err = io.Copy(w, &sparseReader{l: 23e8}); err != nil {
                t.Errorf("Compress failed: %v", err)
                return
        }
index 9a0273ba2070fd0b62ea18c9e3cde41e63d6b7c6..8ba3242102779d2917640f48f9178a75f503ff3b 100644 (file)
@@ -19,7 +19,7 @@ const (
        C1     = 3.14159265
        C2     = 2.718281828i
        C3     = -123.456e-789
-       C4     = +123.456E+789
+       C4     = +123.456e+789
        C5     = 1234i
        C6     = "foo\n"
        C7     = `bar\n`
index 299055215595c7bac76eec5ae6bfc5487298eed1..0243ea0417fbea54cf5c870b5ef62796941901d6 100644 (file)
@@ -92,9 +92,9 @@ func Tanh(x complex128) complex128 {
 func reducePi(x float64) float64 {
        const (
                // extended precision value of PI:
-               DP1 = 3.14159265160560607910E0   // ?? 0x400921fb54000000
-               DP2 = 1.98418714791870343106E-9  // ?? 0x3e210b4610000000
-               DP3 = 1.14423774522196636802E-17 // ?? 0x3c6a62633145c06e
+               DP1 = 3.14159265160560607910e0   // ?? 0x400921fb54000000
+               DP2 = 1.98418714791870343106e-9  // ?? 0x3e210b4610000000
+               DP3 = 1.14423774522196636802e-17 // ?? 0x3c6a62633145c06e
        )
        t := x / math.Pi
        if t >= 0 {
index cc8b1366ad37b2810f2c1f8d4ed35326c10e4253..3b6dbe33977fbdf17da3f75a66e004bd8aa4a0dc 100644 (file)
@@ -91,22 +91,22 @@ package math
 
 // sin coefficients
 var _sin = [...]float64{
-       1.58962301576546568060E-10, // 0x3de5d8fd1fd19ccd
-       -2.50507477628578072866E-8, // 0xbe5ae5e5a9291f5d
-       2.75573136213857245213E-6,  // 0x3ec71de3567d48a1
-       -1.98412698295895385996E-4, // 0xbf2a01a019bfdf03
-       8.33333333332211858878E-3,  // 0x3f8111111110f7d0
-       -1.66666666666666307295E-1, // 0xbfc5555555555548
+       1.58962301576546568060e-10, // 0x3de5d8fd1fd19ccd
+       -2.50507477628578072866e-8, // 0xbe5ae5e5a9291f5d
+       2.75573136213857245213e-6,  // 0x3ec71de3567d48a1
+       -1.98412698295895385996e-4, // 0xbf2a01a019bfdf03
+       8.33333333332211858878e-3,  // 0x3f8111111110f7d0
+       -1.66666666666666307295e-1, // 0xbfc5555555555548
 }
 
 // cos coefficients
 var _cos = [...]float64{
-       -1.13585365213876817300E-11, // 0xbda8fa49a0861a9b
-       2.08757008419747316778E-9,   // 0x3e21ee9d7b4e3f05
-       -2.75573141792967388112E-7,  // 0xbe927e4f7eac4bc6
-       2.48015872888517045348E-5,   // 0x3efa01a019c844f5
-       -1.38888888888730564116E-3,  // 0xbf56c16c16c14f91
-       4.16666666666665929218E-2,   // 0x3fa555555555554b
+       -1.13585365213876817300e-11, // 0xbda8fa49a0861a9b
+       2.08757008419747316778e-9,   // 0x3e21ee9d7b4e3f05
+       -2.75573141792967388112e-7,  // 0xbe927e4f7eac4bc6
+       2.48015872888517045348e-5,   // 0x3efa01a019c844f5
+       -1.38888888888730564116e-3,  // 0xbf56c16c16c14f91
+       4.16666666666665929218e-2,   // 0x3fa555555555554b
 }
 
 // Cos returns the cosine of the radian argument x.
@@ -118,9 +118,9 @@ func Cos(x float64) float64
 
 func cos(x float64) float64 {
        const (
-               PI4A = 7.85398125648498535156E-1  // 0x3fe921fb40000000, Pi/4 split into three parts
-               PI4B = 3.77489470793079817668E-8  // 0x3e64442d00000000,
-               PI4C = 2.69515142907905952645E-15 // 0x3ce8469898cc5170,
+               PI4A = 7.85398125648498535156e-1  // 0x3fe921fb40000000, Pi/4 split into three parts
+               PI4B = 3.77489470793079817668e-8  // 0x3e64442d00000000,
+               PI4C = 2.69515142907905952645e-15 // 0x3ce8469898cc5170,
        )
        // special cases
        switch {
@@ -179,9 +179,9 @@ func Sin(x float64) float64
 
 func sin(x float64) float64 {
        const (
-               PI4A = 7.85398125648498535156E-1  // 0x3fe921fb40000000, Pi/4 split into three parts
-               PI4B = 3.77489470793079817668E-8  // 0x3e64442d00000000,
-               PI4C = 2.69515142907905952645E-15 // 0x3ce8469898cc5170,
+               PI4A = 7.85398125648498535156e-1  // 0x3fe921fb40000000, Pi/4 split into three parts
+               PI4B = 3.77489470793079817668e-8  // 0x3e64442d00000000,
+               PI4C = 2.69515142907905952645e-15 // 0x3ce8469898cc5170,
        )
        // special cases
        switch {
index c002db6b3cd169bd5fc36c4b61399a2605099629..5c5726f6898a73c209a6ecb471719d97f4e29da1 100644 (file)
@@ -14,9 +14,9 @@ package math
 //     Sincos(NaN) = NaN, NaN
 func Sincos(x float64) (sin, cos float64) {
        const (
-               PI4A = 7.85398125648498535156E-1  // 0x3fe921fb40000000, Pi/4 split into three parts
-               PI4B = 3.77489470793079817668E-8  // 0x3e64442d00000000,
-               PI4C = 2.69515142907905952645E-15 // 0x3ce8469898cc5170,
+               PI4A = 7.85398125648498535156e-1  // 0x3fe921fb40000000, Pi/4 split into three parts
+               PI4B = 3.77489470793079817668e-8  // 0x3e64442d00000000,
+               PI4C = 2.69515142907905952645e-15 // 0x3ce8469898cc5170,
        )
        // special cases
        switch {
index 0d5394cf264d3531a205a44c00cd695a704ed1c0..49b1239208012dc9229f9e0d87641e7050e347e6 100644 (file)
@@ -61,16 +61,16 @@ package math
 
 // tan coefficients
 var _tanP = [...]float64{
-       -1.30936939181383777646E4, // 0xc0c992d8d24f3f38
-       1.15351664838587416140E6,  // 0x413199eca5fc9ddd
-       -1.79565251976484877988E7, // 0xc1711fead3299176
+       -1.30936939181383777646e4, // 0xc0c992d8d24f3f38
+       1.15351664838587416140e6,  // 0x413199eca5fc9ddd
+       -1.79565251976484877988e7, // 0xc1711fead3299176
 }
 var _tanQ = [...]float64{
-       1.00000000000000000000E0,
-       1.36812963470692954678E4,  //0x40cab8a5eeb36572
-       -1.32089234440210967447E6, //0xc13427bc582abc96
-       2.50083801823357915839E7,  //0x4177d98fc2ead8ef
-       -5.38695755929454629881E7, //0xc189afe03cbe5a31
+       1.00000000000000000000e0,
+       1.36812963470692954678e4,  //0x40cab8a5eeb36572
+       -1.32089234440210967447e6, //0xc13427bc582abc96
+       2.50083801823357915839e7,  //0x4177d98fc2ead8ef
+       -5.38695755929454629881e7, //0xc189afe03cbe5a31
 }
 
 // Tan returns the tangent of the radian argument x.
@@ -83,9 +83,9 @@ func Tan(x float64) float64
 
 func tan(x float64) float64 {
        const (
-               PI4A = 7.85398125648498535156E-1  // 0x3fe921fb40000000, Pi/4 split into three parts
-               PI4B = 3.77489470793079817668E-8  // 0x3e64442d00000000,
-               PI4C = 2.69515142907905952645E-15 // 0x3ce8469898cc5170,
+               PI4A = 7.85398125648498535156e-1  // 0x3fe921fb40000000, Pi/4 split into three parts
+               PI4B = 3.77489470793079817668e-8  // 0x3e64442d00000000,
+               PI4C = 2.69515142907905952645e-15 // 0x3ce8469898cc5170,
        )
        // special cases
        switch {
index eaa0e4cc52a687e4c034ddb4592b0b45345edb7d..0b7fb7f8540e477c3d3620e27187acddb7da5797 100644 (file)
@@ -55,14 +55,14 @@ package math
 //
 
 var tanhP = [...]float64{
-       -9.64399179425052238628E-1,
-       -9.92877231001918586564E1,
-       -1.61468768441708447952E3,
+       -9.64399179425052238628e-1,
+       -9.92877231001918586564e1,
+       -1.61468768441708447952e3,
 }
 var tanhQ = [...]float64{
-       1.12811678491632931402E2,
-       2.23548839060100448583E3,
-       4.84406305325125486048E3,
+       1.12811678491632931402e2,
+       2.23548839060100448583e3,
+       4.84406305325125486048e3,
 }
 
 // Tanh returns the hyperbolic tangent of x.