remove unused imports in a go file? Static check error/warning is okay, but if i purposely comment functions from imported pkgs, it removes the import as well (default behaviour and as it should). I then have to search for fully qualified import name again and put it back in. Btw, I have format on save enabled in vscode.
If you don't use the packages, why would you even import them?
I did mention that while tweaking/ making changes in the code, I might temporarily comment function/s from imported packages. Im not pushing or committing the code, Just testing. If i would save the file, formatting cleans up the unused imports.
make Ctrl + Z, and comment the import out
Обсуждают сегодня