1 package lib 2 3 // Holder keeps its field unexported. Another package may hold a *Holder and 4 // call the accessor, but may not name the field in a composite literal. 5 type Holder struct { 6 tag int32 7 } 8 9 func NewHolder(tag int32) (h *Holder) { return &Holder{tag: tag} } 10 func Tag(h *Holder) (n int32) { return h.tag } 11