// An explicit extension should override the DNSNames from the
// template.
ExtraExtensions: []pkix.Extension{
- pkix.Extension{
+ {
Id: oidExtensionSubjectAltName,
Value: sanContents,
},
// with two extension attributes.
template.Attributes = []pkix.AttributeTypeAndValueSET{
- pkix.AttributeTypeAndValueSET{
+ {
Type: oidExtensionRequest,
Value: [][]pkix.AttributeTypeAndValue{
- []pkix.AttributeTypeAndValue{
- pkix.AttributeTypeAndValue{
+ {
+ {
Type: oidExtensionAuthorityInfoAccess,
Value: []byte("foo"),
},
}
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
{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},