Skip to content

Commit 3cc3ef2

Browse files
committed
更新
1 parent 9c0ebc2 commit 3cc3ef2

File tree

14 files changed

+57
-57
lines changed

14 files changed

+57
-57
lines changed

ber/asn1/ber_asn1_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ type TestSet struct {
427427

428428
var unmarshalTestData = []struct {
429429
in []byte
430-
out interface{}
430+
out any
431431
}{
432432
{[]byte{0x02, 0x01, 0x42}, newInt(0x42)},
433433
{[]byte{0x05, 0x00}, &RawValue{0, 5, false, false, []byte{}, []byte{0x05, 0x00}}},
@@ -493,7 +493,7 @@ type RelativeDistinguishedNameSET []AttributeTypeAndValue
493493

494494
type AttributeTypeAndValue struct {
495495
Type ObjectIdentifier
496-
Value interface{}
496+
Value any
497497
}
498498

499499
type Validity struct {
@@ -926,7 +926,7 @@ func TestUnmarshalInvalidUTF8(t *testing.T) {
926926
func TestMarshalNilValue(t *testing.T) {
927927
nilValueTestData := []interface{}{
928928
nil,
929-
struct{ V interface{} }{},
929+
struct{ V any }{},
930930
}
931931
for i, test := range nilValueTestData {
932932
if _, err := Marshal(test); err == nil {

ber/asn1/ber_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ type TestExplicitIndefinite struct {
6565

6666
var berUnmarshalTestData = []struct {
6767
in []byte
68-
out interface{}
68+
out any
6969
}{
7070
{
7171
[]byte{0x30, 0x80, 0x31, 0x80, 0x02, 0x01, 0x01, 0x02, 0x01, 0x02, 0x02, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00},

ber/asn1/encode_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ type sequence2Test struct {
129129
}
130130

131131
type marshalTest struct {
132-
in interface{}
132+
in any
133133
out string
134134
}
135135

@@ -293,7 +293,7 @@ func TestMarshal2(t *testing.T) {
293293
}
294294

295295
type marshalWithOptionsTest struct {
296-
in interface{}
296+
in any
297297
out string
298298
options string
299299
}

hash/cmac/aes/cmac_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ var testData = `
6262

6363
// Load test vectors
6464
func loadCMACAESExamples() []cmacAESExample {
65-
var examplesJSON map[string]interface{}
65+
var examplesJSON map[string]any
6666

6767
exampleData := []byte(testData)
6868

hash/pmac/aes/pmac_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ var testPmacData = `
106106

107107
// Load test vectors
108108
func loadPMACAESExamples() []pmacAESExample {
109-
var examplesJSON map[string]interface{}
109+
var examplesJSON map[string]any
110110

111111
exampleData := []byte(testPmacData)
112112

hash/pmac/block_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var testData = `
4949

5050
// Load test vectors
5151
func loadDblExamples() []dblExample {
52-
var examplesJSON map[string]interface{}
52+
var examplesJSON map[string]any
5353

5454
exampleData := []byte(testData)
5555

hash/pmac/pmac_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ var testPmacData = `
124124

125125
// Load test vectors
126126
func loadPMACAESExamples() []pmacAESExample {
127-
var examplesJSON map[string]interface{}
127+
var examplesJSON map[string]any
128128

129129
exampleData := []byte(testPmacData)
130130

mode/eax/eax_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const (
1717

1818
func TestEAXImplementsAEADInterface(t *testing.T) {
1919
var eaxInstance eax
20-
var aux interface{} = &eaxInstance
20+
var aux any = &eaxInstance
2121
_, ok := aux.(cipher.AEAD)
2222
if !ok {
2323
t.Errorf("Error: EAX does not implement AEAD interface")

mode/ocb/ocb_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const (
2121

2222
func TestOCBImplementsAEADInterface(t *testing.T) {
2323
var ocbInstance ocb
24-
var aux interface{} = &ocbInstance
24+
var aux any = &ocbInstance
2525
_, ok := aux.(cipher.AEAD)
2626
if !ok {
2727
t.Errorf("Error: OCB can't implement AEAD interface")

mode/siv/aes/siv_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func init() {
151151

152152
// Load test vectors
153153
func loadAESSIVExamples(filename string) []aesSIVExample {
154-
var examplesJSON map[string]interface{}
154+
var examplesJSON map[string]any
155155

156156
exampleData := testData[filename]
157157

0 commit comments

Comments
 (0)