Go

Go

Made by DeepSource

Drop unnecessary use of the blank identifier SCC-S1005

Anti-pattern
Major
Autofix

Assigning to the blank identifier is unnecessary.

From the Go spec:

If the last iteration variable is the blank identifier, the range clause is equivalent to the same clause without that identifier.

Bad practice

for _ = range slc {}

x, _ = someMap[key]

_ = <-ch

Recommended

for range slc {}

x = someMap[key]

<-ch