Commit b39e2a0c authored by Robert Griesemer's avatar Robert Griesemer

src, misc: applied gofmt -w -s

TBR=rsc
R=golang-codereviews
CC=golang-codereviews
https://golang.org/cl/111770043
parent 138099ae
...@@ -525,7 +525,7 @@ func TestCipherSuiteCertPreferenceECDSA(t *testing.T) { ...@@ -525,7 +525,7 @@ func TestCipherSuiteCertPreferenceECDSA(t *testing.T) {
config = *testConfig config = *testConfig
config.CipherSuites = []uint16{TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA} config.CipherSuites = []uint16{TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA}
config.Certificates = []Certificate{ config.Certificates = []Certificate{
Certificate{ {
Certificate: [][]byte{testECDSACertificate}, Certificate: [][]byte{testECDSACertificate},
PrivateKey: testECDSAPrivateKey, PrivateKey: testECDSAPrivateKey,
}, },
......
...@@ -850,7 +850,7 @@ func TestCertificateRequestOverrides(t *testing.T) { ...@@ -850,7 +850,7 @@ func TestCertificateRequestOverrides(t *testing.T) {
// An explicit extension should override the DNSNames from the // An explicit extension should override the DNSNames from the
// template. // template.
ExtraExtensions: []pkix.Extension{ ExtraExtensions: []pkix.Extension{
pkix.Extension{ {
Id: oidExtensionSubjectAltName, Id: oidExtensionSubjectAltName,
Value: sanContents, Value: sanContents,
}, },
...@@ -868,11 +868,11 @@ func TestCertificateRequestOverrides(t *testing.T) { ...@@ -868,11 +868,11 @@ func TestCertificateRequestOverrides(t *testing.T) {
// with two extension attributes. // with two extension attributes.
template.Attributes = []pkix.AttributeTypeAndValueSET{ template.Attributes = []pkix.AttributeTypeAndValueSET{
pkix.AttributeTypeAndValueSET{ {
Type: oidExtensionRequest, Type: oidExtensionRequest,
Value: [][]pkix.AttributeTypeAndValue{ Value: [][]pkix.AttributeTypeAndValue{
[]pkix.AttributeTypeAndValue{ {
pkix.AttributeTypeAndValue{ {
Type: oidExtensionAuthorityInfoAccess, Type: oidExtensionAuthorityInfoAccess,
Value: []byte("foo"), Value: []byte("foo"),
}, },
......
...@@ -18,7 +18,7 @@ import ( ...@@ -18,7 +18,7 @@ import (
func ExampleNewReader() { func ExampleNewReader() {
msg := &mail.Message{ msg := &mail.Message{
Header: map[string][]string{ Header: map[string][]string{
"Content-Type": []string{"multipart/mixed; boundary=foo"}, "Content-Type": {"multipart/mixed; boundary=foo"},
}, },
Body: strings.NewReader( Body: strings.NewReader(
"--foo\r\nFoo: one\r\n\r\nA section\r\n" + "--foo\r\nFoo: one\r\n\r\nA section\r\n" +
......
...@@ -2404,13 +2404,13 @@ func TestServerConnState(t *testing.T) { ...@@ -2404,13 +2404,13 @@ func TestServerConnState(t *testing.T) {
} }
want := map[int][]ConnState{ want := map[int][]ConnState{
1: []ConnState{StateNew, StateActive, StateIdle, StateActive, StateClosed}, 1: {StateNew, StateActive, StateIdle, StateActive, StateClosed},
2: []ConnState{StateNew, StateActive, StateIdle, StateActive, StateClosed}, 2: {StateNew, StateActive, StateIdle, StateActive, StateClosed},
3: []ConnState{StateNew, StateActive, StateHijacked}, 3: {StateNew, StateActive, StateHijacked},
4: []ConnState{StateNew, StateActive, StateHijacked}, 4: {StateNew, StateActive, StateHijacked},
5: []ConnState{StateNew, StateClosed}, 5: {StateNew, StateClosed},
6: []ConnState{StateNew, StateActive, StateClosed}, 6: {StateNew, StateActive, StateClosed},
7: []ConnState{StateNew, StateActive, StateIdle, StateClosed}, 7: {StateNew, StateActive, StateIdle, StateClosed},
} }
logString := func(m map[int][]ConnState) string { logString := func(m map[int][]ConnState) string {
var b bytes.Buffer var b bytes.Buffer
......
...@@ -679,7 +679,7 @@ var deepEqualTests = []DeepEqualTest{ ...@@ -679,7 +679,7 @@ var deepEqualTests = []DeepEqualTest{
{1, nil, false}, {1, nil, false},
{fn1, fn3, false}, {fn1, fn3, false},
{fn3, fn3, false}, {fn3, fn3, false},
{[][]int{[]int{1}}, [][]int{[]int{2}}, false}, {[][]int{{1}}, [][]int{{2}}, false},
// Nil vs empty: not the same. // Nil vs empty: not the same.
{[]int{}, []int(nil), false}, {[]int{}, []int(nil), false},
......
...@@ -484,7 +484,7 @@ func makeOnePass(p *onePassProg) *onePassProg { ...@@ -484,7 +484,7 @@ func makeOnePass(p *onePassProg) *onePassProg {
} }
} }
if p != notOnePass { if p != notOnePass {
for i, _ := range p.Inst { for i := range p.Inst {
p.Inst[i].Rune = onePassRunes[i] p.Inst[i].Rune = onePassRunes[i]
} }
} }
......
...@@ -241,7 +241,7 @@ func BenchmarkMapIter(b *testing.B) { ...@@ -241,7 +241,7 @@ func BenchmarkMapIter(b *testing.B) {
} }
b.ResetTimer() b.ResetTimer()
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
for _, _ = range m { for _ = range m {
} }
} }
} }
...@@ -250,7 +250,7 @@ func BenchmarkMapIterEmpty(b *testing.B) { ...@@ -250,7 +250,7 @@ func BenchmarkMapIterEmpty(b *testing.B) {
m := make(map[int]bool) m := make(map[int]bool)
b.ResetTimer() b.ResetTimer()
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
for _, _ = range m { for _ = range m {
} }
} }
} }
......
...@@ -233,7 +233,7 @@ func TestRaceCaseFallthrough(t *testing.T) { ...@@ -233,7 +233,7 @@ func TestRaceCaseFallthrough(t *testing.T) {
func TestRaceCaseIssue6418(t *testing.T) { func TestRaceCaseIssue6418(t *testing.T) {
m := map[string]map[string]string{ m := map[string]map[string]string{
"a": map[string]string{ "a": {
"b": "c", "b": "c",
}, },
} }
......
...@@ -96,7 +96,7 @@ func BenchmarkRuneIterate2(b *testing.B) { ...@@ -96,7 +96,7 @@ func BenchmarkRuneIterate2(b *testing.B) {
} }
s := string(bytes) s := string(bytes)
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
for _, _ = range s { for _ = range s {
} }
} }
} }
......
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