Description

AddNamedImport adds the import path to the file f, if absent. If name is not empty, it is used to rename the import.

For example, calling

AddNamedImport(fset, f, "pathpkg", "path")

adds

import pathpkg "path"

AddNamedImport is referenced in 13 repositories

github.com/golang/tools github.com/visualfc/gotools github.com/mwhudson/golang-go.tools

...