Documentation
¶
Overview ¶
Package imports changes the import paths of Go files, keeping everything else byte for byte. orb eject uses it to point an app at its copy of a built-in module, and go generate to point a golden app's copy back at the library (ADR-0083).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Rewrite ¶
Rewrite changes src's imports that m maps, then formats it. The import gets the package's name when that differs from its new path's last element, and loses a name that the new path makes redundant, so the file keeps compiling and reads the same; and it moves to the group of imports it belongs with, such as the app's own. changed is false, and src is returned as it is, when m maps none of src's imports.
Types ¶
Click to show internal directories.
Click to hide internal directories.