This is an example that access exported members from a unexported struct.
// pk/pk.go
package pk
type point struct {
X, Y int
}
func NewPoint(x, y int) *point { // return a pointer, the struct is hidden
return &point{x, y}
}
// main.go
package main
import "fmt"
func main() {
p := pk.NewPoint(2, 3)
fmt.Println(p.X, p.Y)
}