goimports will add an import for the package you are currently in if you make a mistake.
Repro:
Open a file in golang.org/x/tools/internal/lsp/source and replace "View" with "source.View". An import for golang.org/x/tools/internal/lsp/source will be added by goimports.