Skip to content

Commit 0e0d539

Browse files
committed
fix: linting errors
1 parent 1c94fc7 commit 0e0d539

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

aws/sqs/sqs_integration_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func awsCmdQueueURL() string {
7575
panic(err)
7676
} else {
7777
var payload map[string]string
78-
json.Unmarshal(out, &payload)
78+
_ = json.Unmarshal(out, &payload)
7979
return payload["QueueUrl"]
8080
}
8181
}
@@ -105,7 +105,7 @@ func awsCmdReceiveMessage() string {
105105
panic(err)
106106
} else {
107107
var payload map[string][]map[string]string
108-
json.Unmarshal(out, &payload)
108+
_ = json.Unmarshal(out, &payload)
109109
return payload["Messages"][0]["Body"]
110110
}
111111
}
@@ -123,7 +123,7 @@ func awsCmdReceiveMessages() []string {
123123
panic(err)
124124
} else {
125125
var payload map[string][]map[string]string
126-
json.Unmarshal(out, &payload)
126+
_ = json.Unmarshal(out, &payload)
127127

128128
var bodies []string
129129
for _, msg := range payload["Messages"] {
@@ -146,7 +146,7 @@ func awsCmdQueueCount() int {
146146
panic(err)
147147
} else {
148148
var payload map[string]map[string]string
149-
json.Unmarshal(out, &payload)
149+
_ = json.Unmarshal(out, &payload)
150150
rvalue, _ := strconv.Atoi(payload["Attributes"]["ApproximateNumberOfMessages"])
151151
return rvalue
152152
}
@@ -165,7 +165,7 @@ func awsCmdQueueInFlightCount() int {
165165
}
166166

167167
var payload map[string]map[string]string
168-
json.Unmarshal(out, &payload)
168+
_ = json.Unmarshal(out, &payload)
169169

170170
rvalue, _ := strconv.Atoi(payload["Attributes"]["ApproximateNumberOfMessagesNotVisible"])
171171
return rvalue
@@ -541,7 +541,7 @@ func TestSendBatch(t *testing.T) {
541541
// ACTION
542542
var maxBytes int = 262144
543543
maxSizeSingleMessage := ""
544-
for _ = range maxBytes {
544+
for range maxBytes {
545545
maxSizeSingleMessage += "a"
546546
}
547547
err = client.SendBatch(context.TODO(), awsCmdQueueURL(), []string{maxSizeSingleMessage})
@@ -560,7 +560,7 @@ func TestSendBatch(t *testing.T) {
560560
// ACTION
561561
var maxHalfBytes int = 131072
562562
maxHalfSizeMessage := ""
563-
for _ = range maxHalfBytes {
563+
for range maxHalfBytes {
564564
maxHalfSizeMessage += "a"
565565
}
566566
err = client.SendBatch(context.TODO(), awsCmdQueueURL(), []string{maxHalfSizeMessage, maxHalfSizeMessage})
@@ -614,7 +614,7 @@ func TestSendNBatch(t *testing.T) {
614614
// ACTION
615615
var maxBytes int = 262144
616616
maxSizeSingleMessage := ""
617-
for _ = range maxBytes {
617+
for range maxBytes {
618618
maxSizeSingleMessage += "a"
619619
}
620620
batchesSent, err := client.SendNBatch(context.TODO(), awsCmdQueueURL(), []string{maxSizeSingleMessage, maxSizeSingleMessage})
@@ -659,7 +659,7 @@ func TestSendNBatch(t *testing.T) {
659659
assert.Equal(t, 3, batchesSent)
660660

661661
receiveCount := 0
662-
for _ = range 3 {
662+
for range batchesSent {
663663
messages := awsCmdReceiveMessages()
664664
for _, m := range messages {
665665
if m == smallMessageText {

0 commit comments

Comments
 (0)