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

I might not have used `goimports` before. I read now that it also auto-imports when you uncomment. That's neat, but it could auto-import the wrong thing, and I'm not sure how it would handle conflicts. It still seems worse than just ignoring my unused imports. Unused imports should be more of a linting thing? If the compiler knows its unused, I don't see why it can't just ignore it.


Yes, it can import the wrong thing (or version) but it doesn't happen that often in my experience. If you use the libraries in other files it can go off of what is already in your go.mod file.




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

Search: