Simplify nil check before Close
ProprietaryReplace if x != nil { x.Close() } with x.Close() where the nil check is redundant.
org. openrewrite. golang. codequality. SimplifyNilCheckBeforeClosemod run . --recipe= org. openrewrite. golang. codequality. SimplifyNilCheckBeforeCloseInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.