It is illegal for a package to import itself, directly or indirectly, or to directly import a package without referring to any of its exported identifiers.
- https://golang.org/ref/spec
I'm saying that the tooling that helps manage import paths in the way you want is not part of Go-the-language.
The language restriction against unused imports certainly is.
It is illegal for a package to import itself, directly or indirectly, or to directly import a package without referring to any of its exported identifiers.
- https://golang.org/ref/spec