Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not true.

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



What?

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.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: