Go

Go

Made by DeepSource

Pure function's return value is discarded, making the call pointless SCC-SA4017

Anti-pattern
Major
Autofix

Return value of a pure function the value should always be handled else, calling the function is pointless. If the return value is not required, it is recommended to remove the function call.

Bad practice

strings.Replace("", "", "", 1) // return value is discarded
f := foo(1)

Recommended

f := foo(1)