summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2011-12-01 14:33:24 -0800
committerRobert Griesemer <gri@golang.org>2011-12-01 14:33:24 -0800
commite573a88fb455baef1afa3b388ceb531c1594b7c6 (patch)
tree1bf3e5c894cbf567ae67ae60975d48cd8743c40f
parent93e8b4a5ba5ea0bb507cc4bff757e115857d0e5b (diff)
downloadgo-e573a88fb455baef1afa3b388ceb531c1594b7c6.tar.gz
gofmt: applied gofmt -w -s src misc
R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/5451070
-rw-r--r--misc/cgo/gmp/pi.go2
-rw-r--r--misc/swig/callback/run.go2
-rw-r--r--src/cmd/godoc/httpzip.go4
-rw-r--r--src/cmd/gofix/timefileinfo.go2
-rw-r--r--src/pkg/archive/zip/writer_test.go4
-rw-r--r--src/pkg/html/render_test.go8
-rw-r--r--src/pkg/html/template/escape.go2
-rw-r--r--src/pkg/html/template/escape_test.go2
8 files changed, 13 insertions, 13 deletions
diff --git a/misc/cgo/gmp/pi.go b/misc/cgo/gmp/pi.go
index 45f61abbd..3e40624cf 100644
--- a/misc/cgo/gmp/pi.go
+++ b/misc/cgo/gmp/pi.go
@@ -38,8 +38,8 @@ POSSIBILITY OF SUCH DAMAGE.
package main
import (
- big "gmp"
"fmt"
+ big "gmp"
"runtime"
)
diff --git a/misc/swig/callback/run.go b/misc/swig/callback/run.go
index a76e636cb..b3f13ad90 100644
--- a/misc/swig/callback/run.go
+++ b/misc/swig/callback/run.go
@@ -5,8 +5,8 @@
package main
import (
- "swig/callback"
"fmt"
+ "swig/callback"
)
type GoCallback struct{}
diff --git a/src/cmd/godoc/httpzip.go b/src/cmd/godoc/httpzip.go
index 198a348cb..9f3da0874 100644
--- a/src/cmd/godoc/httpzip.go
+++ b/src/cmd/godoc/httpzip.go
@@ -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:],
diff --git a/src/cmd/gofix/timefileinfo.go b/src/cmd/gofix/timefileinfo.go
index 9a037d79a..cff8309cc 100644
--- a/src/cmd/gofix/timefileinfo.go
+++ b/src/cmd/gofix/timefileinfo.go
@@ -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
diff --git a/src/pkg/archive/zip/writer_test.go b/src/pkg/archive/zip/writer_test.go
index 25491dc75..118810356 100644
--- a/src/pkg/archive/zip/writer_test.go
+++ b/src/pkg/archive/zip/writer_test.go
@@ -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,
diff --git a/src/pkg/html/render_test.go b/src/pkg/html/render_test.go
index d166a3b87..1b68b258f 100644
--- a/src/pkg/html/render_test.go
+++ b/src/pkg/html/render_test.go
@@ -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: `\`,
},
diff --git a/src/pkg/html/template/escape.go b/src/pkg/html/template/escape.go
index 4a7a9354c..2f6be3b6c 100644
--- a/src/pkg/html/template/escape.go
+++ b/src/pkg/html/template/escape.go
@@ -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 {
diff --git a/src/pkg/html/template/escape_test.go b/src/pkg/html/template/escape_test.go
index b4daca7d6..9f8519353 100644
--- a/src/pkg/html/template/escape_test.go
+++ b/src/pkg/html/template/escape_test.go
@@ -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)