Remove redundant type conversion
ProprietaryRemove a conversion whose operand already has the target type, such as string(s) where s is a string. byte and uint8 name one type, as do rune and int32, so a conversion between either pair is removed too. A conversion of an untyped constant is what gives the constant its type, so it stays.
org. openrewrite. golang. codequality. RemoveRedundantTypeConversionmod run . --recipe= org. openrewrite. golang. codequality. RemoveRedundantTypeConversionInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.