dedupimport
dedupimport copied to clipboard
astutil.DeleteNamedImport could replace most of the de-duplication code
Package astutil has a DeleteNamedImport function, which looks like it could be used to replace most of the de-duplication code in this command.
https://godoc.org/golang.org/x/tools/go/ast/astutil#DeleteNamedImport
Along with astutil.Add[Named]Import.