Hacker News new | ask | show | jobs
by jjallen 780 days ago
Goland. How would an IDE know that you intended a struct field to be public or not?
1 comments

Any non-private usage of a private struct is a compile error.

If you're using goland, it would report this as an error as it is effectively compiling your code as you write it.

Also, autocomplete wouldn't work when you tried to use the private struct.