]> Cypherpunks repositories - gostls13.git/commitdiff
gofmt: applied gofmt -w -s src misc
authorRobert Griesemer <gri@golang.org>
Thu, 1 Dec 2011 22:33:24 +0000 (14:33 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 1 Dec 2011 22:33:24 +0000 (14:33 -0800)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5451070

misc/cgo/gmp/pi.go
misc/swig/callback/run.go
src/cmd/godoc/httpzip.go
src/cmd/gofix/timefileinfo.go
src/pkg/archive/zip/writer_test.go
src/pkg/html/render_test.go
src/pkg/html/template/escape.go
src/pkg/html/template/escape_test.go

index 45f61abbd617129caa70fcb2ea5aaab538b594d5..3e40624cfab0b6340e88b284ed7bc132d3032f14 100644 (file)
@@ -38,8 +38,8 @@ POSSIBILITY OF SUCH DAMAGE.
 package main
 
 import (
-       big "gmp"
        "fmt"
+       big "gmp"
        "runtime"
 )
 
index a76e636cb522d5ed8e6fb19d501b6fb323e780db..b3f13ad908bdaa294b9ade676807fcdbd0d44d41 100644 (file)
@@ -5,8 +5,8 @@
 package main
 
 import (
-       "swig/callback"
        "fmt"
+       "swig/callback"
 )
 
 type GoCallback struct{}
index 198a348cbf1aa991d2f1465418d94538563f85d0..9f3da08749f1539950b1b654378b4864bb1fc46d 100644 (file)
@@ -165,8 +165,8 @@ func (fs *httpZipFS) Open(name string) (http.File, error) {
                &fileInfo{
                        name,
                        os.ModeDir,
-                       0,  // no size for directory
-                       time.Time{},  // no mtime for directory
+                       0,           // no size for directory
+                       time.Time{}, // no mtime for directory
                },
                nil,
                fs.list[index:],
index 9a037d79a693834ad6531b016423181425ff4891..cff8309cc1c9b2196ef59c06065c8cd51bacbf2f 100644 (file)
@@ -69,7 +69,7 @@ var timefileinfoTypeConfig = &TypeConfig{
 //
 func timefileinfoIsOld(f *ast.File, typeof map[interface{}]string) bool {
        old := false
-       
+
        // called records the expressions that appear as
        // the function part of a function call, so that
        // we can distinguish a ref to the possibly new time.UTC
index 25491dc753d56225b08c7af0285b867e7442d706..1188103568e16ee17bfb780c8ab241a6c32d3e78 100644 (file)
@@ -21,12 +21,12 @@ type WriteTest struct {
 }
 
 var writeTests = []WriteTest{
-       WriteTest{
+       {
                Name:   "foo",
                Data:   []byte("Rabbits, guinea pigs, gophers, marsupial rats, and quolls."),
                Method: Store,
        },
-       WriteTest{
+       {
                Name:   "bar",
                Data:   nil, // large data set in the test
                Method: Deflate,
index d166a3b87362db5152ddd70981daa0fccc355868..1b68b258f28b2c688f356cb3d9cd77c8138bfbcb 100644 (file)
@@ -30,11 +30,11 @@ func TestRenderer(t *testing.T) {
                                                Type: ElementNode,
                                                Data: "p",
                                                Attr: []Attribute{
-                                                       Attribute{
+                                                       {
                                                                Key: "id",
                                                                Val: "A",
                                                        },
-                                                       Attribute{
+                                                       {
                                                                Key: "foo",
                                                                Val: `abc"def`,
                                                        },
@@ -48,7 +48,7 @@ func TestRenderer(t *testing.T) {
                                                                Type: ElementNode,
                                                                Data: "b",
                                                                Attr: []Attribute{
-                                                                       Attribute{
+                                                                       {
                                                                                Key: "empty",
                                                                                Val: "",
                                                                        },
@@ -64,7 +64,7 @@ func TestRenderer(t *testing.T) {
                                                                Type: ElementNode,
                                                                Data: "i",
                                                                Attr: []Attribute{
-                                                                       Attribute{
+                                                                       {
                                                                                Key: "backslash",
                                                                                Val: `\`,
                                                                        },
index 4a7a9354c93f5863e00003606d2b5b5f31795ca0..2f6be3b6c21feee57319a5d3a7436635fdc4c7b6 100644 (file)
@@ -716,7 +716,7 @@ func (e *escaper) editTextNode(n *parse.TextNode, text []byte) {
 // commit applies changes to actions and template calls needed to contextually
 // autoescape content and adds any derived templates to the set.
 func (e *escaper) commit() {
-       for name, _ := range e.output {
+       for name := range e.output {
                e.template(name).Funcs(funcMap)
        }
        for _, t := range e.derived {
index b4daca7d6bdc3c9ec47d7d4ebd98fe07d8bfdb21..9f85193539928137bc8d0ba48b216e015f7161cd 100644 (file)
@@ -1597,7 +1597,7 @@ func TestRedundantFuncs(t *testing.T) {
 
        for n0, m := range redundantFuncs {
                f0 := funcMap[n0].(func(...interface{}) string)
-               for n1, _ := range m {
+               for n1 := range m {
                        f1 := funcMap[n1].(func(...interface{}) string)
                        for _, input := range inputs {
                                want := f0(input)