]> Cypherpunks.ru repositories - gostls13.git/commitdiff
making some more non-gofmt'ed files save for new semicolon rule
authorRobert Griesemer <gri@golang.org>
Thu, 10 Dec 2009 03:27:08 +0000 (19:27 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 10 Dec 2009 03:27:08 +0000 (19:27 -0800)
R=rsc, r
https://golang.org/cl/171051

12 files changed:
test/blank.go
test/chan/powser1.go
test/cmp1.go
test/cmp2.go
test/cmp3.go
test/cmp4.go
test/cmp5.go
test/convert.go
test/float_lit.go
test/indirect.go
test/indirect1.go
test/intcvt.go

index 7b9d64257e27969efe8e07ef3b673bc21719cd60..7175964f7e5c459b55951c09e457e18a68af7bc2 100644 (file)
@@ -31,7 +31,7 @@ const (
 var ints = []string {
        "1",
        "2",
-       "3"
+       "3",
 }
 
 func f() (int, int) {
index fc828330683a04c4e8ed2172322db202d66ac4ef..bb36b15941bf3898bd672b221578cddbb4115a37 100644 (file)
@@ -20,8 +20,11 @@ type rat struct  {
 }
 
 func (u rat) pr() {
-       if u.den==1 { print(u.num) }
-       else { print(u.num, "/", u.den) }
+       if u.den==1 {
+               print(u.num)
+       } else {
+               print(u.num, "/", u.den)
+       }
        print(" ")
 }
 
@@ -264,8 +267,7 @@ func inv(u rat) rat {       // invert a rat
 }
 
 // print eval in floating point of PS at x=c to n terms
-func evaln(c rat, U PS, n int)
-{
+func evaln(c rat, U PS, n int) {
        xn := float64(1);
        x := float64(c.num)/float64(c.den);
        val := float64(0);
@@ -285,8 +287,11 @@ func printn(U PS, n int) {
        done := false;
        for ; !done && n>0; n-- {
                u := get(U);
-               if end(u) != 0 { done = true }
-               else { u.pr() }
+               if end(u) != 0 {
+                       done = true
+               } else {
+                       u.pr()
+               }
        }
        print(("\n"));
 }
@@ -344,8 +349,11 @@ func Cmul(c rat,U PS) PS {
                for !done {
                        <-Z.req;
                        u := get(U);
-                       if end(u) != 0 { done = true }
-                       else { Z.dat <- mul(c,u) }
+                       if end(u) != 0 {
+                               done = true
+                       } else {
+                               Z.dat <- mul(c,u)
+                       }
                }
                Z.dat <- finis;
        }();
@@ -461,8 +469,9 @@ func Diff(U PS) PS {
                        done:=false;
                        for i:=1; !done; i++ {
                                u = get(U);
-                               if end(u) != 0 { done=true }
-                               else {
+                               if end(u) != 0 {
+                                       done = true
+                               } else {
                                        Z.dat <- mul(itor(int64(i)),u);
                                        <-Z.req;
                                }
@@ -556,8 +565,11 @@ func Subst(U, V PS) PS {
                u := get(U);
                Z.dat <- u;
                if end(u) == 0 {
-                       if end(get(VV[0])) != 0 { put(finis,Z); }
-                       else { copy(Mul(VV[0],Subst(U,VV[1])),Z); }
+                       if end(get(VV[0])) != 0 {
+                               put(finis,Z);
+                       } else {
+                               copy(Mul(VV[0],Subst(U,VV[1])),Z);
+                       }
                }
        }();
        return Z;
index 67bde32779b4c3c2411c58643827cba77d2bf92c..a119f8746d94006d684f458faa4f6479dd77dcaa 100644 (file)
@@ -22,8 +22,7 @@ func istrue(b bool) {
        if !b { panicln("wanted true, got false") } // stack will explain where
 }
 
-func main()
-{
+func main() {
        var a []int;
        var b map[string]int;
 
index d43cfcd1071ef6ede0e982161f80fca21f818e05..5442fa17ac68d531f07c89c8496d4c023c4e1929 100644 (file)
@@ -8,8 +8,7 @@ package main
 
 func use(bool) { }
 
-func main()
-{
+func main() {
        var a []int;
        var ia interface{} = a;
        use(ia == ia);
index 1f53c07a142ec5a9ee1c1d56b6ccc30d18e27ec3..f34542aded1ca2de02ea9ba2fc33c1e9e4e513b1 100644 (file)
@@ -8,8 +8,7 @@ package main
 
 func use(bool) { }
 
-func main()
-{
+func main() {
        var b []int;
        var ib interface{} = b;
        use(ib == ib);
index 61787b07c49ce4f1a102f9a762339110d959eb02..ca1ad2ad356b59b35f0ae07b4126c28a1c6a48f9 100644 (file)
@@ -6,8 +6,7 @@
 
 package main
 
-func main()
-{
+func main() {
        var a []int;
        var ia interface{} = a;
        var m = make(map[interface{}] int);
index 2a55f7b8f4c8fb7feffaf96c13de86ed0734a921..9c339a43a35d20268082b108ea095b28cadb844a 100644 (file)
@@ -6,8 +6,7 @@
 
 package main
 
-func main()
-{
+func main() {
        var b []int;
        var ib interface{} = b;
        var m = make(map[interface{}] int);
index 3790bf17ed512e6ee7b03209b2e81ba99afb2944..6a50b39002a7410ce41a67ae31999571a50cc00b 100644 (file)
@@ -22,9 +22,7 @@ func g() int {
 
 type T func() int
 
-var m = map[string] T {
-       "f": f
-}
+var m = map[string] T { "f": f }
 
 type A int
 type B int
index be4460e43eecb1bf40abc069f87dd63efb8fc24f..58bd4dac01bc23ebf9846ad4d7d107fe870d621b 100644 (file)
@@ -7,16 +7,14 @@
 package main
 
 func
-pow10(pow int) float64
-{
+pow10(pow int) float64 {
        if pow < 0 { return 1/pow10(-pow); }
        if pow > 0 { return pow10(pow-1)*10; }
        return 1;
 }
 
 func
-close(da float64, ia, ib int64, pow int) bool
-{
+close(da float64, ia, ib int64, pow int) bool {
        db := float64(ia) / float64(ib);
        db *= pow10(pow);
 
@@ -39,8 +37,7 @@ close(da float64, ia, ib int64, pow int) bool
 }
 
 func
-main()
-{
+main() {
 
        if !close(0., 0, 1, 0) { print("0. is ", 0., "\n"); }
        if !close(+10., 10, 1, 0) { print("+10. is ", +10., "\n"); }
index cbe3e0df2aaefccae50f409ca2fc275121efa1b7..06c1dcce7b100f6c2400c98bb50629a7ebf7e9f8 100644 (file)
@@ -28,16 +28,14 @@ var b2 *[]int = &b0
 var b3 []int = []int{1, 2, 3}
 var b4 *[]int = &b3
 
-func crash()
-{
+func crash() {
        // these uses of nil pointers
        // would crash but should type check
        println("crash",
                len(a1) + cap(a1));
 }
 
-func nocrash()
-{
+func nocrash() {
        // this is spaced funny so that
        // the compiler will print a different
        // line number for each len call if
@@ -79,7 +77,6 @@ func nocrash()
        }
 }
 
-func main()
-{
+func main() {
        nocrash();
 }
index b87eb144cca347ee9085e2792323d520e9d5a7c5..7cd476a01bc14786ef8bbf80c07294f3be55acf2 100644 (file)
@@ -28,8 +28,7 @@ var b2 *[]int = &b0
 var b3 []int = []int{1, 2, 3}
 var b4 *[]int = &b3
 
-func f()
-{
+func f() {
        // this is spaced funny so that
        // the compiler will print a different
        // line number for each len call when
index a108cffa1bee7b5ebb7b07f36294dd5db7558f9d..a54d276e6b2f2eba7f358bc53ad1460cd8da66e9 100644 (file)
@@ -47,8 +47,7 @@ func chku64(i, v uint64) { if i != v { panicln(i, "!=", v) } }
 //func chkf32(f, v float32) { if f != v { panicln(f, "!=", v) } }
 //func chkf64(f, v float64) { if f != v { panicln(f, "!=", v) } }
 
-func main()
-{
+func main() {
        chki8(int8(i8), ci8 & 0xff - 1<<8);
        chki8(int8(i16), ci16 & 0xff);
        chki8(int8(i32), ci32 & 0xff - 1<<8);