On Wed, Jan 14, 2015 at 9:46 PM, Oliver <
olive...@gmail.com> wrote:
> Both types are not visible outside the package so the fields aren't, either.
> But what's the idiomatic way to name those fields? Or doesn't it matter at
> all?
The types aren't visible, but you can still pass values of those types
to functions in other packages.
Those functions from other packages will only be able to see the
exported fields on those types.
A common case is the encoding/json package. You might have a type that
isn't exported, but that you want to be able to encode to json.
For the json pkg to see the fields on the struct they'd have to be exported.