johnnadratowski / golang-neo4j-bolt-driver

Golang Bolt driver for Neo4j
MIT License
213 stars 72 forks source link

Best way to refactor `DriverPool interface` so it can be mocked. #47

Open geoah opened 6 years ago

geoah commented 6 years ago

Hey there,

I'm trying to mock the bolt driver and I'm having some issues with the DriverPool interface. It has a non-exported method that takes another non-exported struct as its argument.

type DriverPool interface {
    OpenPool() (Conn, error)
    reclaim(*boltConn) error
}

If you can point me to the direction you'd like this to go to I can make a PR for it.

Thank you very much in advance :)