Commit 15a3a5cf authored by Robert Griesemer's avatar Robert Griesemer

gofmt: applied gofmt -w -s src misc

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5451070
parent e281576b
...@@ -38,8 +38,8 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -38,8 +38,8 @@ POSSIBILITY OF SUCH DAMAGE.
package main package main
import ( import (
big "gmp"
"fmt" "fmt"
big "gmp"
"runtime" "runtime"
) )
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
package main package main
import ( import (
"swig/callback"
"fmt" "fmt"
"swig/callback"
) )
type GoCallback struct{} type GoCallback struct{}
......
...@@ -165,8 +165,8 @@ func (fs *httpZipFS) Open(name string) (http.File, error) { ...@@ -165,8 +165,8 @@ func (fs *httpZipFS) Open(name string) (http.File, error) {
&fileInfo{ &fileInfo{
name, name,
os.ModeDir, os.ModeDir,
0, // no size for directory 0, // no size for directory
time.Time{}, // no mtime for directory time.Time{}, // no mtime for directory
}, },
nil, nil,
fs.list[index:], fs.list[index:],
......
...@@ -69,7 +69,7 @@ var timefileinfoTypeConfig = &TypeConfig{ ...@@ -69,7 +69,7 @@ var timefileinfoTypeConfig = &TypeConfig{
// //
func timefileinfoIsOld(f *ast.File, typeof map[interface{}]string) bool { func timefileinfoIsOld(f *ast.File, typeof map[interface{}]string) bool {
old := false old := false
// called records the expressions that appear as // called records the expressions that appear as
// the function part of a function call, so that // the function part of a function call, so that
// we can distinguish a ref to the possibly new time.UTC // we can distinguish a ref to the possibly new time.UTC
......
...@@ -21,12 +21,12 @@ type WriteTest struct { ...@@ -21,12 +21,12 @@ type WriteTest struct {
} }
var writeTests = []WriteTest{ var writeTests = []WriteTest{
WriteTest{ {
Name: "foo", Name: "foo",
Data: []byte("Rabbits, guinea pigs, gophers, marsupial rats, and quolls."), Data: []byte("Rabbits, guinea pigs, gophers, marsupial rats, and quolls."),
Method: Store, Method: Store,
}, },
WriteTest{ {
Name: "bar", Name: "bar",
Data: nil, // large data set in the test Data: nil, // large data set in the test
Method: Deflate, Method: Deflate,
......
...@@ -30,11 +30,11 @@ func TestRenderer(t *testing.T) { ...@@ -30,11 +30,11 @@ func TestRenderer(t *testing.T) {
Type: ElementNode, Type: ElementNode,
Data: "p", Data: "p",
Attr: []Attribute{ Attr: []Attribute{
Attribute{ {
Key: "id", Key: "id",
Val: "A", Val: "A",
}, },
Attribute{ {
Key: "foo", Key: "foo",
Val: `abc"def`, Val: `abc"def`,
}, },
...@@ -48,7 +48,7 @@ func TestRenderer(t *testing.T) { ...@@ -48,7 +48,7 @@ func TestRenderer(t *testing.T) {
Type: ElementNode, Type: ElementNode,
Data: "b", Data: "b",
Attr: []Attribute{ Attr: []Attribute{
Attribute{ {
Key: "empty", Key: "empty",
Val: "", Val: "",
}, },
...@@ -64,7 +64,7 @@ func TestRenderer(t *testing.T) { ...@@ -64,7 +64,7 @@ func TestRenderer(t *testing.T) {
Type: ElementNode, Type: ElementNode,
Data: "i", Data: "i",
Attr: []Attribute{ Attr: []Attribute{
Attribute{ {
Key: "backslash", Key: "backslash",
Val: `\`, Val: `\`,
}, },
......
...@@ -716,7 +716,7 @@ func (e *escaper) editTextNode(n *parse.TextNode, text []byte) { ...@@ -716,7 +716,7 @@ func (e *escaper) editTextNode(n *parse.TextNode, text []byte) {
// commit applies changes to actions and template calls needed to contextually // commit applies changes to actions and template calls needed to contextually
// autoescape content and adds any derived templates to the set. // autoescape content and adds any derived templates to the set.
func (e *escaper) commit() { func (e *escaper) commit() {
for name, _ := range e.output { for name := range e.output {
e.template(name).Funcs(funcMap) e.template(name).Funcs(funcMap)
} }
for _, t := range e.derived { for _, t := range e.derived {
......
...@@ -1597,7 +1597,7 @@ func TestRedundantFuncs(t *testing.T) { ...@@ -1597,7 +1597,7 @@ func TestRedundantFuncs(t *testing.T) {
for n0, m := range redundantFuncs { for n0, m := range redundantFuncs {
f0 := funcMap[n0].(func(...interface{}) string) f0 := funcMap[n0].(func(...interface{}) string)
for n1, _ := range m { for n1 := range m {
f1 := funcMap[n1].(func(...interface{}) string) f1 := funcMap[n1].(func(...interface{}) string)
for _, input := range inputs { for _, input := range inputs {
want := f0(input) want := f0(input)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment