package lib // Holder keeps its field unexported. Another package may hold a *Holder and // call the accessor, but may not name the field in a composite literal. type Holder struct { tag int32 } func NewHolder(tag int32) (h *Holder) { return &Holder{tag: tag} } func Tag(h *Holder) (n int32) { return h.tag }