rspec/rules/S108/go/code-example.adoc

9 lines
173 B
Plaintext
Raw Normal View History

2023-06-15 19:03:19 +02:00
[source,go]
----
func compute(a int, b int) {
sum := a + b
if sum > 0 { } // Noncompliant; empty on purpose or missing piece of code?
fmt.Println("Result:", sum)
}
----