Skip to content

Commit 30273b8

Browse files
committed
build(ci): also check for code simplification
1 parent 8d76d00 commit 30273b8

File tree

8 files changed

+73
-66
lines changed

8 files changed

+73
-66
lines changed

.github/workflows/linter.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,11 @@ jobs:
2424
with:
2525
go-version: 1.18
2626
- name: Run go fmt
27-
run: go fmt ./...
27+
run: |
28+
NON_COMPLIANT_FILES=$(gofmt -s -l $(find . -type f -name '*.go'| grep -v "/.template/"))
29+
if [ -n "$NON_COMPLIANT_FILES" ]; then
30+
echo "The following files are not formatted correctly:"
31+
echo "$NON_COMPLIANT_FILES"
32+
exit 1
33+
fi
34+

input_test.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,17 @@ example.com
175175
`
176176
port := uint(443)
177177
expected := []ScanTarget{
178-
ScanTarget{IP: net.ParseIP("10.0.0.1"), Domain: "example.com", Tag: "tag"},
179-
ScanTarget{IP: net.ParseIP("10.0.0.1"), Domain: "example.com"},
180-
ScanTarget{IP: net.ParseIP("10.0.0.1")},
181-
ScanTarget{Domain: "example.com"},
182-
ScanTarget{Domain: "example.com"},
183-
ScanTarget{IP: net.ParseIP("2.2.2.0"), Tag: "tag"},
184-
ScanTarget{IP: net.ParseIP("2.2.2.1"), Tag: "tag"},
185-
ScanTarget{IP: net.ParseIP("2.2.2.2"), Tag: "tag"},
186-
ScanTarget{IP: net.ParseIP("2.2.2.3"), Tag: "tag"},
187-
ScanTarget{IP: net.ParseIP("10.0.0.1"), Domain: "example.com", Tag: "tag", Port: &port},
188-
ScanTarget{IP: net.ParseIP("10.0.0.1"), Port: &port},
178+
{IP: net.ParseIP("10.0.0.1"), Domain: "example.com", Tag: "tag"},
179+
{IP: net.ParseIP("10.0.0.1"), Domain: "example.com"},
180+
{IP: net.ParseIP("10.0.0.1")},
181+
{Domain: "example.com"},
182+
{Domain: "example.com"},
183+
{IP: net.ParseIP("2.2.2.0"), Tag: "tag"},
184+
{IP: net.ParseIP("2.2.2.1"), Tag: "tag"},
185+
{IP: net.ParseIP("2.2.2.2"), Tag: "tag"},
186+
{IP: net.ParseIP("2.2.2.3"), Tag: "tag"},
187+
{IP: net.ParseIP("10.0.0.1"), Domain: "example.com", Tag: "tag", Port: &port},
188+
{IP: net.ParseIP("10.0.0.1"), Port: &port},
189189
}
190190

191191
ch := make(chan ScanTarget, 0)

lib/output/test/process_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1050,14 +1050,14 @@ func TestMySQL(t *testing.T) {
10501050
SerialNumber: big.NewInt(2),
10511051
Issuer: pkix.Name{
10521052
CommonName: "MySQL_Server_8.0.3-rc_Auto_Generated_CA_Certificate",
1053-
Names: []pkix.AttributeTypeAndValue{pkix.AttributeTypeAndValue{Type: asn1.ObjectIdentifier{2, 5, 4, 3},
1053+
Names: []pkix.AttributeTypeAndValue{{Type: asn1.ObjectIdentifier{2, 5, 4, 3},
10541054
Value: "MySQL_Server_8.0.3-rc_Auto_Generated_CA_Certificate"}},
10551055
ExtraNames: []pkix.AttributeTypeAndValue(nil),
10561056
OriginalRDNS: pkix.RDNSequence{pkix.RelativeDistinguishedNameSET{pkix.AttributeTypeAndValue{Type: asn1.ObjectIdentifier{2, 5, 4, 3},
10571057
Value: "MySQL_Server_8.0.3-rc_Auto_Generated_CA_Certificate"}}}},
10581058
Subject: pkix.Name{
10591059
CommonName: "MySQL_Server_8.0.3-rc_Auto_Generated_Server_Certificate",
1060-
Names: []pkix.AttributeTypeAndValue{pkix.AttributeTypeAndValue{Type: asn1.ObjectIdentifier{2, 5, 4, 3},
1060+
Names: []pkix.AttributeTypeAndValue{{Type: asn1.ObjectIdentifier{2, 5, 4, 3},
10611061
Value: "MySQL_Server_8.0.3-rc_Auto_Generated_Server_Certificate"}},
10621062
ExtraNames: []pkix.AttributeTypeAndValue(nil),
10631063
OriginalRDNS: pkix.RDNSequence{pkix.RelativeDistinguishedNameSET{pkix.AttributeTypeAndValue{Type: asn1.ObjectIdentifier{2, 5, 4, 3},

lib/smb/smb/session.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ func (s *Session) TreeDisconnect(name string) error {
330330

331331
func (s *Session) Close() {
332332
s.Debug("Closing session", nil)
333-
for k, _ := range s.trees {
333+
for k := range s.trees {
334334
s.TreeDisconnect(k)
335335
}
336336
s.Debug("Closing TCP connection", nil)

modules/oracle/connection.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func (conn *Connection) Connect(connectDescriptor string) (*HandshakeLog, error)
250250
Version: encodeReleaseVersion(conn.scanner.config.ReleaseVersion),
251251
Options: NSNOptions(0),
252252
Services: []NSNService{
253-
NSNService{
253+
{
254254
Type: NSNServiceSupervisor,
255255
Values: []NSNValue{
256256
*NSNValueVersion(conn.scanner.config.ReleaseVersion),
@@ -259,7 +259,7 @@ func (conn *Connection) Connect(connectDescriptor string) (*HandshakeLog, error)
259259
},
260260
Marker: 0,
261261
},
262-
NSNService{
262+
{
263263
Type: NSNServiceAuthentication,
264264
Values: []NSNValue{
265265
*NSNValueVersion(conn.scanner.config.ReleaseVersion),
@@ -270,15 +270,15 @@ func (conn *Connection) Connect(connectDescriptor string) (*HandshakeLog, error)
270270
},
271271
Marker: 0,
272272
},
273-
NSNService{
273+
{
274274
Type: NSNServiceEncryption,
275275
Values: []NSNValue{
276276
*NSNValueVersion(conn.scanner.config.ReleaseVersion),
277277
*NSNValueBytes(encryptionBytes),
278278
},
279279
Marker: 0,
280280
},
281-
NSNService{
281+
{
282282
Type: NSNServiceDataIntegrity,
283283
Values: []NSNValue{
284284
*NSNValueVersion(conn.scanner.config.ReleaseVersion),

modules/oracle/types_test.go

+41-41
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ func fromHex(h string) []byte {
6666
}
6767

6868
var validHeaders = map[string]TNSHeader{
69-
"00 08 00 01 02 03 00 45": TNSHeader{
69+
"00 08 00 01 02 03 00 45": {
7070
Length: 8,
7171
PacketChecksum: 1,
7272
Type: 2,
7373
Flags: 3,
7474
HeaderChecksum: 0x45,
7575
},
76-
"f2 1e 01 00 07 06 76 54": TNSHeader{
76+
"f2 1e 01 00 07 06 76 54": {
7777
Length: 0xF21E,
7878
PacketChecksum: 0x0100,
7979
Type: 0x07,
@@ -95,7 +95,7 @@ func orPanic(ret []byte, err error) []byte {
9595
}
9696

9797
var validTNSData = map[string]TestCase{
98-
"00.empty": TestCase{
98+
"00.empty": {
9999
Encoding: "00 0A 00 00 06 00 00 00 80 00",
100100
Value: &TNSPacket{
101101
Header: &TNSHeader{
@@ -111,7 +111,7 @@ var validTNSData = map[string]TestCase{
111111
},
112112
},
113113
},
114-
"00.trivial": TestCase{
114+
"00.trivial": {
115115
Encoding: "00 10 00 00 06 00 00 00 00 01 31 32 33 34 35 36",
116116
Value: &TNSPacket{
117117
Header: &TNSHeader{
@@ -127,7 +127,7 @@ var validTNSData = map[string]TestCase{
127127
},
128128
},
129129
},
130-
"01.NSN.Request": TestCase{
130+
"01.NSN.Request": {
131131
Encoding: "00 a8 00 00 06 00 00 00 00 00 de ad be ef 00 9e " + /* ................ */
132132
"0a 20 03 00 00 04 00 00 04 00 03 00 00 00 00 00 " + /* . .............. */
133133
"04 00 05 0a 20 03 00 00 08 00 01 00 00 04 ec 19 " + /* .... ........... */
@@ -154,7 +154,7 @@ var validTNSData = map[string]TestCase{
154154
Version: encodeReleaseVersion("10.2.0.3.0"),
155155
Options: NSNOptions(0),
156156
Services: []NSNService{
157-
NSNService{
157+
{
158158
Type: 4,
159159
Values: []NSNValue{
160160
*NSNValueVersion("10.2.0.3.0"),
@@ -163,45 +163,45 @@ var validTNSData = map[string]TestCase{
163163
},
164164
Marker: 0,
165165
},
166-
NSNService{
166+
{
167167
Type: 1,
168168
Values: []NSNValue{
169169
*NSNValueVersion("10.2.0.3.0"),
170-
NSNValue{
170+
{
171171
Type: 3,
172172
Value: fromHex("e0 e1"),
173173
},
174-
NSNValue{
174+
{
175175
Type: 6,
176176
Value: fromHex("fc ff"),
177177
},
178-
NSNValue{
178+
{
179179
Type: 2,
180180
Value: fromHex("01"),
181181
},
182-
NSNValue{
182+
{
183183
Type: 0,
184184
Value: []byte("NTS"),
185185
},
186186
},
187187
Marker: 0,
188188
},
189-
NSNService{
189+
{
190190
Type: 2,
191191
Values: []NSNValue{
192192
*NSNValueVersion("10.2.0.3.0"),
193-
NSNValue{
193+
{
194194
Type: 1,
195195
Value: fromHex("00 11 06 10 0c 0f 0a 0b 08 02 01 03"),
196196
},
197197
},
198198
Marker: 0,
199199
},
200-
NSNService{
200+
{
201201
Type: 3,
202202
Values: []NSNValue{
203203
*NSNValueVersion("10.2.0.3.0"),
204-
NSNValue{
204+
{
205205
Type: 1,
206206
Value: fromHex("00 03 01"),
207207
},
@@ -215,7 +215,7 @@ var validTNSData = map[string]TestCase{
215215
}
216216

217217
var validTNSConnect = map[string]TestCase{
218-
"01. 013A-0139": TestCase{
218+
"01. 013A-0139": {
219219
Encoding: "00 ca 00 00 01 00 00 00 01 3a 01 2c 0c 41 20 00 " + /* .........:.,.A . */
220220
"ff ff 7f 08 00 00 01 00 00 90 00 3a 00 00 08 00 " + /* ...........:.... */
221221
"41 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 " + /* AA.............. */
@@ -254,7 +254,7 @@ var validTNSConnect = map[string]TestCase{
254254
},
255255
},
256256
},
257-
"02. 138-138": TestCase{
257+
"02. 138-138": {
258258
Encoding: "01 00 00 00 01 04 00 00 01 38 01 2c 00 00 08 00 " + /* .........8.,.... */
259259
"7f ff 86 0e 00 00 01 00 00 c6 00 3a 00 00 02 00 " + /* ...........:.... */
260260
"61 61 00 00 00 00 00 00 00 00 00 00 04 10 00 00 " + /* aa.............. */
@@ -296,7 +296,7 @@ var validTNSConnect = map[string]TestCase{
296296
},
297297
},
298298
},
299-
"03. 138-138": TestCase{
299+
"03. 138-138": {
300300
Encoding: "00 ec 00 00 01 04 00 00 01 38 01 2c 00 00 08 00 " + /* .........8.,.... */
301301
"7f ff 86 0e 00 00 01 00 00 b2 00 3a 00 00 02 00 " + /* ...........:.... */
302302
"61 61 00 00 00 00 00 00 00 00 00 00 10 ec 00 00 " + /* aa.............. */
@@ -337,7 +337,7 @@ var validTNSConnect = map[string]TestCase{
337337
},
338338
},
339339
},
340-
"unknown": TestCase{
340+
"unknown": {
341341
Encoding: "00 d7 00 00 01 00 00 00 01 3b 01 2c 0c 41 20 00 " + /* .........;.,.A . */
342342
"ff ff 7f 08 00 00 01 00 00 91 00 46 00 00 08 00 " + /* ...........F.... */
343343
"41 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 " + /* AA.............. */
@@ -377,7 +377,7 @@ var validTNSConnect = map[string]TestCase{
377377
},
378378
},
379379
},
380-
"unknown3a": TestCase{
380+
"unknown3a": {
381381
Encoding: "00 d7 00 00 01 00 00 00 01 3b 01 2c 0c 41 20 00 " + /* .........;.,.A . */
382382
"ff ff 7f 08 00 00 01 00 00 91 00 46 00 00 08 00 " + /* ...........F.... */
383383
"41 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 " + /* AA.............. */
@@ -420,7 +420,7 @@ var validTNSConnect = map[string]TestCase{
420420
}
421421

422422
var validTNSAccept = map[string]TestCase{
423-
"01. 013A-0139": TestCase{
423+
"01. 013A-0139": {
424424
Encoding: "00 20 00 00 02 00 00 00 01 39 00 00 08 00 7f ff " + /* . .......9...... */
425425
"01 00 00 00 00 20 61 61 00 00 00 00 00 00 00 00 ", /* ..... aa........ */
426426
Value: &TNSPacket{
@@ -587,7 +587,7 @@ func TestTNSData(t *testing.T) {
587587

588588
var descriptorValues = map[string]Descriptor{
589589
//"()": Descriptor{},
590-
"(DESCRIPTION=(ERR=1153)(VSNNUM=186647040)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='()'))(ERROR=(CODE=303)(EMFI=1))))": Descriptor{
590+
"(DESCRIPTION=(ERR=1153)(VSNNUM=186647040)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='()'))(ERROR=(CODE=303)(EMFI=1))))": {
591591
DescriptorEntry{"DESCRIPTION.ERR", "1153"},
592592
DescriptorEntry{"DESCRIPTION.VSNNUM", "186647040"},
593593
DescriptorEntry{"DESCRIPTION.ERROR_STACK.ERROR.CODE", "1153"},
@@ -596,7 +596,7 @@ var descriptorValues = map[string]Descriptor{
596596
DescriptorEntry{"DESCRIPTION.ERROR_STACK.ERROR.CODE", "303"},
597597
DescriptorEntry{"DESCRIPTION.ERROR_STACK.ERROR.EMFI", "1"},
598598
},
599-
"(DESCRIPTION=\n\t(ERR=1153)\n\t(VSNNUM=186647040)\n\t(ERROR_STACK=\n\t\t(ERROR=(CODE=1153)(EMFI=4)(ARGS='()'))\n\t\t(ERROR=(CODE=303)(EMFI=1))\n\t)\n)\n": Descriptor{
599+
"(DESCRIPTION=\n\t(ERR=1153)\n\t(VSNNUM=186647040)\n\t(ERROR_STACK=\n\t\t(ERROR=(CODE=1153)(EMFI=4)(ARGS='()'))\n\t\t(ERROR=(CODE=303)(EMFI=1))\n\t)\n)\n": {
600600
DescriptorEntry{"DESCRIPTION.ERR", "1153"},
601601
DescriptorEntry{"DESCRIPTION.VSNNUM", "186647040"},
602602
DescriptorEntry{"DESCRIPTION.ERROR_STACK.ERROR.CODE", "1153"},
@@ -605,7 +605,7 @@ var descriptorValues = map[string]Descriptor{
605605
DescriptorEntry{"DESCRIPTION.ERROR_STACK.ERROR.CODE", "303"},
606606
DescriptorEntry{"DESCRIPTION.ERROR_STACK.ERROR.EMFI", "1"},
607607
},
608-
" (DESCRIPTION=\r\n (ERR=1153)\r\n (VSNNUM=186647040)\r\n (ERROR_STACK=\r\n (ERROR=(CODE=1153)(EMFI=4)(ARGS='()'))\r\n (ERROR=(CODE=303)(EMFI=1))\r\n )\r\n) ": Descriptor{
608+
" (DESCRIPTION=\r\n (ERR=1153)\r\n (VSNNUM=186647040)\r\n (ERROR_STACK=\r\n (ERROR=(CODE=1153)(EMFI=4)(ARGS='()'))\r\n (ERROR=(CODE=303)(EMFI=1))\r\n )\r\n) ": {
609609
DescriptorEntry{"DESCRIPTION.ERR", "1153"},
610610
DescriptorEntry{"DESCRIPTION.VSNNUM", "186647040"},
611611
DescriptorEntry{"DESCRIPTION.ERROR_STACK.ERROR.CODE", "1153"},
@@ -614,7 +614,7 @@ var descriptorValues = map[string]Descriptor{
614614
DescriptorEntry{"DESCRIPTION.ERROR_STACK.ERROR.CODE", "303"},
615615
DescriptorEntry{"DESCRIPTION.ERROR_STACK.ERROR.EMFI", "1"},
616616
},
617-
"(DESCRIPTION=(ERR=1153)(VSNNUM=186647040)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(embedded \\'quotes\\')'))(ERROR=(CODE= \" (23) \" )(EMFI=1))))": Descriptor{
617+
"(DESCRIPTION=(ERR=1153)(VSNNUM=186647040)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(embedded \\'quotes\\')'))(ERROR=(CODE= \" (23) \" )(EMFI=1))))": {
618618
DescriptorEntry{"DESCRIPTION.ERR", "1153"},
619619
DescriptorEntry{"DESCRIPTION.VSNNUM", "186647040"},
620620
DescriptorEntry{"DESCRIPTION.ERROR_STACK.ERROR.CODE", "1153"},
@@ -623,7 +623,7 @@ var descriptorValues = map[string]Descriptor{
623623
DescriptorEntry{"DESCRIPTION.ERROR_STACK.ERROR.CODE", "\" (23) \""},
624624
DescriptorEntry{"DESCRIPTION.ERROR_STACK.ERROR.EMFI", "1"},
625625
},
626-
"(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=)(CID=(PROGRAM=C:\\Users\\localadmin\\work\\oracle\\instantclient_11_2\\sqlplus.exe)(HOST=win10pc)(USER=localadmin)))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))": Descriptor{
626+
"(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=)(CID=(PROGRAM=C:\\Users\\localadmin\\work\\oracle\\instantclient_11_2\\sqlplus.exe)(HOST=win10pc)(USER=localadmin)))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))": {
627627
DescriptorEntry{"DESCRIPTION.CONNECT_DATA.SERVICE_NAME", ""},
628628
DescriptorEntry{"DESCRIPTION.CONNECT_DATA.CID.PROGRAM", "C:\\Users\\localadmin\\work\\oracle\\instantclient_11_2\\sqlplus.exe"},
629629
DescriptorEntry{"DESCRIPTION.CONNECT_DATA.CID.HOST", "win10pc"},
@@ -635,20 +635,20 @@ var descriptorValues = map[string]Descriptor{
635635
}
636636

637637
var descriptorGetValuesTests = map[string]map[string][]string{
638-
"(A=(B=(C=ABC1)(C=ABC2)(D=ABD))(E=AE)(F=))": map[string][]string{
639-
"A.B.C": []string{"ABC1", "ABC2"},
640-
"A.B.D": []string{"ABD"},
641-
"A.E": []string{"AE"},
642-
"does.not.exist": []string{},
643-
"A.F": []string{""},
638+
"(A=(B=(C=ABC1)(C=ABC2)(D=ABD))(E=AE)(F=))": {
639+
"A.B.C": {"ABC1", "ABC2"},
640+
"A.B.D": {"ABD"},
641+
"A.E": {"AE"},
642+
"does.not.exist": {},
643+
"A.F": {""},
644644
},
645-
"(A=(B=(C=ABC1)(D=ABD1))(B=(C=ABC2)(D=ABD2))(B=(E=ABE)(D=ABD3))(F=(G=(H=AFGH)))(I=)(I=iii)(I=)(I=))": map[string][]string{
646-
"A.B.C": []string{"ABC1", "ABC2"},
647-
"A.B.D": []string{"ABD1", "ABD2", "ABD3"},
648-
"A.B.E": []string{"ABE"},
649-
"A.F.G.H": []string{"AFGH"},
650-
"does.not.exist": []string{},
651-
"A.I": []string{"", "iii", "", ""},
645+
"(A=(B=(C=ABC1)(D=ABD1))(B=(C=ABC2)(D=ABD2))(B=(E=ABE)(D=ABD3))(F=(G=(H=AFGH)))(I=)(I=iii)(I=)(I=))": {
646+
"A.B.C": {"ABC1", "ABC2"},
647+
"A.B.D": {"ABD1", "ABD2", "ABD3"},
648+
"A.B.E": {"ABE"},
649+
"A.F.G.H": {"AFGH"},
650+
"does.not.exist": {},
651+
"A.I": {"", "iii", "", ""},
652652
},
653653
}
654654

@@ -673,14 +673,14 @@ type GetValueTestResult struct {
673673
}
674674

675675
var descriptorGetValueTests = map[string]map[string]GetValueTestResult{
676-
"(A=(B=(C=ABC1)(C=ABC2)(D=ABD))(E=AE)(F=))": map[string]GetValueTestResult{
676+
"(A=(B=(C=ABC1)(C=ABC2)(D=ABD))(E=AE)(F=))": {
677677
"A.B.C": {Value: "", Error: ErrUnexpectedResponse},
678678
"A.B.D": {Value: "ABD", Error: nil},
679679
"A.E": {Value: "AE", Error: nil},
680680
"does.not.exist": {Value: "", Error: ErrUnexpectedResponse},
681681
"A.F": {Value: "", Error: nil},
682682
},
683-
"(A=(B=(C=ABC1)(D=ABD1))(B=(C=ABC2)(D=ABD2))(B=(E=ABE)(D=ABD3))(F=(G=(H=AFGH)))(I=)(I=))": map[string]GetValueTestResult{
683+
"(A=(B=(C=ABC1)(D=ABD1))(B=(C=ABC2)(D=ABD2))(B=(E=ABE)(D=ABD3))(F=(G=(H=AFGH)))(I=)(I=))": {
684684
"A.B.C": {Value: "", Error: ErrUnexpectedResponse},
685685
"A.B.D": {Value: "", Error: ErrUnexpectedResponse},
686686
"A.B.E": {Value: "ABE", Error: nil},

modules/postgres/connection.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,11 @@ func (m *connectionManager) closeConnection(c io.Closer) {
311311
func (m *connectionManager) cleanUp() {
312312
// first in, last out: empty out the map
313313
defer func() {
314-
for conn, _ := range m.connections {
314+
for conn := range m.connections {
315315
delete(m.connections, conn)
316316
}
317317
}()
318-
for connection, _ := range m.connections {
318+
for connection := range m.connections {
319319
// Close them all even if there is a panic with one
320320
defer func(c io.Closer) {
321321
m.closeConnection(c)

modules/redis/types_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,15 @@ var redisErrorMessages = map[string]string{
136136

137137
// redisArrays maps encoded array values to the corresponding array (Note: reverse key/value order from other maps)
138138
var redisArrays = map[string]RedisArray{
139-
"*0\r\n": RedisArray{},
140-
"*1\r\n+\r\n": RedisArray{SimpleString("")},
141-
"*2\r\n*1\r\n*0\r\n*1\r\n$5\r\n12345\r\n": RedisArray{RedisArray{RedisArray{}}, RedisArray{BulkString("12345")}},
139+
"*0\r\n": {},
140+
"*1\r\n+\r\n": {SimpleString("")},
141+
"*2\r\n*1\r\n*0\r\n*1\r\n$5\r\n12345\r\n": {RedisArray{RedisArray{}}, RedisArray{BulkString("12345")}},
142142
"*5\r\n" +
143143
"+simpleString\r\n" +
144144
"-ERR error message\r\n" +
145145
":12345\r\n" +
146146
"$47\r\n*5\r\n+simpleString\r\n-ERR error message\r\n:12345\r\n\r\n" +
147-
"*0\r\n": RedisArray{
147+
"*0\r\n": {
148148
SimpleString("simpleString"),
149149
ErrorMessage("ERR error message"),
150150
Integer(12345),

0 commit comments

Comments
 (0)