package color
type Color struct {
val string
}
func (c Color) String() string {
return c.val
}
var (
Red = Color{val: "red"}
Green = Color{val: "green"}
Blue = Color{val: "blue"}
)
Since `val` is not exported, external packages cannot create arbitrary `Color`.