Remove redundant type conversion

Proprietary

Remove 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.RemoveRedundantTypeConversion
mod run . --recipe=org.openrewrite.golang.codequality.RemoveRedundantTypeConversion

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