AddImport adds a package to the generated file's import section. It returns the name used for the package.
(importPath GoImportPath)
| 528 | // AddImport adds a package to the generated file's import section. |
| 529 | // It returns the name used for the package. |
| 530 | func (g *Generator) AddImport(importPath GoImportPath) GoPackageName { |
| 531 | g.addedImports[importPath] = true |
| 532 | return g.GoPackageName(importPath) |
| 533 | } |
| 534 | |
| 535 | var globalPackageNames = map[GoPackageName]bool{ |
| 536 | "fmt": true, |
no test coverage detected