]> Cypherpunks repositories - gostls13.git/commitdiff
cleanup: gofmt -s -w src misc
authorRobert Griesemer <gri@golang.org>
Tue, 6 Sep 2011 23:04:55 +0000 (16:04 -0700)
committerRobert Griesemer <gri@golang.org>
Tue, 6 Sep 2011 23:04:55 +0000 (16:04 -0700)
R=r
CC=golang-dev
https://golang.org/cl/4984052

src/pkg/crypto/x509/verify_test.go
src/pkg/http/cgi/host.go
src/pkg/http/fcgi/fcgi_test.go
src/pkg/http/spdy/read.go
src/pkg/json/decode_test.go
src/pkg/path/filepath/path_test.go

index 111f60eb1141d9745c4a5370e7a715f129c890c2..ecff7ffd810c2dce88346ca0fbfec5c5e172237a 100644 (file)
@@ -31,7 +31,7 @@ var verifyTests = []verifyTest{
                dnsName:       "www.google.com",
 
                expectedChains: [][]string{
-                       []string{"Google", "Thawte", "VeriSign"},
+                       {"Google", "Thawte", "VeriSign"},
                },
        },
        {
@@ -68,7 +68,7 @@ var verifyTests = []verifyTest{
                dnsName:       "www.google.com",
 
                expectedChains: [][]string{
-                       []string{"Google", "Thawte", "VeriSign"},
+                       {"Google", "Thawte", "VeriSign"},
                },
        },
        {
@@ -78,7 +78,7 @@ var verifyTests = []verifyTest{
                currentTime:   1302726541,
 
                expectedChains: [][]string{
-                       []string{"dnssec-exp", "StartCom Class 1", "StartCom Certification Authority"},
+                       {"dnssec-exp", "StartCom Class 1", "StartCom Certification Authority"},
                },
        },
        {
@@ -88,8 +88,8 @@ var verifyTests = []verifyTest{
                currentTime:   1302726541,
 
                expectedChains: [][]string{
-                       []string{"dnssec-exp", "StartCom Class 1", "StartCom Certification Authority"},
-                       []string{"dnssec-exp", "StartCom Class 1", "StartCom Certification Authority", "StartCom Certification Authority"},
+                       {"dnssec-exp", "StartCom Class 1", "StartCom Certification Authority"},
+                       {"dnssec-exp", "StartCom Class 1", "StartCom Certification Authority", "StartCom Certification Authority"},
                },
        },
 }
index f7de89f9974ecae9a2ef4faa07e5e8a171e3dd3a..d36eaa19b4b66e404ca73e29c304b9c1c9d98be4 100644 (file)
@@ -32,13 +32,13 @@ import (
 var trailingPort = regexp.MustCompile(`:([0-9]+)$`)
 
 var osDefaultInheritEnv = map[string][]string{
-       "darwin":  []string{"DYLD_LIBRARY_PATH"},
-       "freebsd": []string{"LD_LIBRARY_PATH"},
-       "hpux":    []string{"LD_LIBRARY_PATH", "SHLIB_PATH"},
-       "irix":    []string{"LD_LIBRARY_PATH", "LD_LIBRARYN32_PATH", "LD_LIBRARY64_PATH"},
-       "linux":   []string{"LD_LIBRARY_PATH"},
-       "solaris": []string{"LD_LIBRARY_PATH", "LD_LIBRARY_PATH_32", "LD_LIBRARY_PATH_64"},
-       "windows": []string{"SystemRoot", "COMSPEC", "PATHEXT", "WINDIR"},
+       "darwin":  {"DYLD_LIBRARY_PATH"},
+       "freebsd": {"LD_LIBRARY_PATH"},
+       "hpux":    {"LD_LIBRARY_PATH", "SHLIB_PATH"},
+       "irix":    {"LD_LIBRARY_PATH", "LD_LIBRARYN32_PATH", "LD_LIBRARY64_PATH"},
+       "linux":   {"LD_LIBRARY_PATH"},
+       "solaris": {"LD_LIBRARY_PATH", "LD_LIBRARY_PATH_32", "LD_LIBRARY_PATH_64"},
+       "windows": {"SystemRoot", "COMSPEC", "PATHEXT", "WINDIR"},
 }
 
 // Handler runs an executable in a subprocess with a CGI environment.
index 16a6243295e4d0d35f817436aeb089aacdb181c4..5c8e46bd75a6b4da1d9ae2c32fe0a0aba9b48842 100644 (file)
@@ -53,13 +53,13 @@ var streamTests = []struct {
        {"two records", typeStdin, 300, make([]byte, 66000),
                bytes.Join([][]byte{
                        // header for the first record
-                       []byte{1, typeStdin, 0x01, 0x2C, 0xFF, 0xFF, 1, 0},
+                       {1, typeStdin, 0x01, 0x2C, 0xFF, 0xFF, 1, 0},
                        make([]byte, 65536),
                        // header for the second
-                       []byte{1, typeStdin, 0x01, 0x2C, 0x01, 0xD1, 7, 0},
+                       {1, typeStdin, 0x01, 0x2C, 0x01, 0xD1, 7, 0},
                        make([]byte, 472),
                        // header for the empty record
-                       []byte{1, typeStdin, 0x01, 0x2C, 0, 0, 0, 0},
+                       {1, typeStdin, 0x01, 0x2C, 0, 0, 0, 0},
                },
                        nil),
        },
index c6b6ab3af849ca90f2a9d243f0c8a535eb0fd65e..2b1fd3d0d4241d51745888de233afaf9af405b41 100644 (file)
@@ -214,7 +214,7 @@ func (f *Framer) readSynStreamFrame(h ControlFrameHeader, frame *SynStreamFrame)
        }
        // Remove this condition when we bump Version to 3.
        if Version >= 3 {
-               for h, _ := range frame.Headers {
+               for h := range frame.Headers {
                        if invalidReqHeaders[h] {
                                return &Error{InvalidHeaderPresent, frame.StreamId}
                        }
@@ -247,7 +247,7 @@ func (f *Framer) readSynReplyFrame(h ControlFrameHeader, frame *SynReplyFrame) o
        }
        // Remove this condition when we bump Version to 3.
        if Version >= 3 {
-               for h, _ := range frame.Headers {
+               for h := range frame.Headers {
                        if invalidRespHeaders[h] {
                                return &Error{InvalidHeaderPresent, frame.StreamId}
                        }
@@ -287,7 +287,7 @@ func (f *Framer) readHeadersFrame(h ControlFrameHeader, frame *HeadersFrame) os.
                } else {
                        invalidHeaders = invalidRespHeaders
                }
-               for h, _ := range frame.Headers {
+               for h := range frame.Headers {
                        if invalidHeaders[h] {
                                return &Error{InvalidHeaderPresent, frame.StreamId}
                        }
index 5f6c3f5b8d061cd7604be711607d25ea11568347..c6d4fa0591ff1f52015855c8d68375e461575859 100644 (file)
@@ -42,7 +42,7 @@ var (
        um0, um1 unmarshaler // target2 of unmarshaling
        ump      = &um1
        umtrue   = unmarshaler{true}
-       umslice  = []unmarshaler{unmarshaler{true}}
+       umslice  = []unmarshaler{{true}}
        umslicep = new([]unmarshaler)
        umstruct = ustruct{unmarshaler{true}}
 )
index d2a10698e1492cf8249308e4353eba9e83cf1ac4..395b12775a9ed62c4854e9b4aace65efee29afba 100644 (file)
@@ -81,7 +81,7 @@ var wincleantests = []PathTest{
 func TestClean(t *testing.T) {
        tests := cleantests
        if runtime.GOOS == "windows" {
-               for i, _ := range tests {
+               for i := range tests {
                        tests[i].result = filepath.FromSlash(tests[i].result)
                }
                tests = append(tests, wincleantests...)