Simplify nil check before Close

Proprietary

Replace if x != nil { x.Close() } with x.Close() where the nil check is redundant.

org.openrewrite.golang.codequality.SimplifyNilCheckBeforeClose
mod run . --recipe=org.openrewrite.golang.codequality.SimplifyNilCheckBeforeClose

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.