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.
package main
import (
big "gmp"
"fmt"
big "gmp"
"runtime"
)
......
......@@ -5,8 +5,8 @@
package main
import (
"swig/callback"
"fmt"
"swig/callback"
)
type GoCallback struct{}
......
......@@ -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:],
......
......@@ -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
......
......@@ -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,
......
......@@ -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: `\`,
},
......
......@@ -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 {
......
......@@ -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)
......
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