rspec/rules/S2757/go/fix.adoc

17 lines
259 B
Plaintext
Raw Normal View History

Replace the operators with a single one if that is the intention
[source,go]
----
var target, num = -5, 3
target -= num // target = -8
----
Or fix the spacing to avoid confusion
[source,go]
----
var target, num = -5, 3
target = -num // target = -3
----