Wrote small Go tools related to the language's AST, using the go/ast and go/build packages.
The `predeclared' command finds identifiers that shadow Go's built-in identifiers (make, copy, error, etc.). This type of shadowing results in cognitive overhead when reading code or can lead to unexpected bugs.
The `dedupimport' command fixes duplicate named import declarations in Go source files; i.e. imports that have the same import path but different import names [2].
The `predeclared' command finds identifiers that shadow Go's built-in identifiers (make, copy, error, etc.). This type of shadowing results in cognitive overhead when reading code or can lead to unexpected bugs.
https://github.com/nishanths/predeclared
The `dedupimport' command fixes duplicate named import declarations in Go source files; i.e. imports that have the same import path but different import names [2].
https://github.com/nishanths/dedupimport