Hacker News new | ask | show | jobs
by gtremper 3571 days ago
Technically, exported/unexported is different than public/private since its at the package level. You can access unexported fields of a struct from anywhere within the same package (not just from that struct's "methods"), which isn't true of a 'private' field.
1 comments

IIRC, that is also true for protected members in Java (it has been a while, though, since I have written anything in Java).

If that is a concern, you can create a new package for your type.