create a test file within the package
library_test.go
package mypkg
func TestPrivateStruct(t *testing.T){
pf := private{ "Private Field" }
....
}
library.go
package mypkg
type private struct {
privateField string
}
go test mypkg -v will run your Tests with your private struct