mirror of
https://github.com/golang/go
synced 2024-09-25 15:20:13 -06:00
src, misc: applied gofmt -w -s
TBR=rsc R=golang-codereviews CC=golang-codereviews https://golang.org/cl/111770043
This commit is contained in:
parent
138099ae96
commit
b39e2a0ca3
@ -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) {
|
|||||||
// 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) {
|
|||||||
// 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 (
|
|||||||
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) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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{
|
|||||||
{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 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
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) {
|
|||||||
}
|
}
|
||||||
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) {
|
|||||||
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 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
src/pkg/runtime/race/testdata/mop_test.go
vendored
2
src/pkg/runtime/race/testdata/mop_test.go
vendored
@ -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) {
|
|||||||
}
|
}
|
||||||
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 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user