Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/go/ast/astutil: AddNamedImport isn't symmetrical to DeleteNamedImport #28605
And it works as expected. It's a low-level AST manipulation primitive that allows one to delete the exact import statement with the provided name and import path.
However, it has a bug where once the AST has an import with the specified import path, it's not possible to add other imports with the same import path but different names.
This bug is causing #16411.