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