2 ms·
Thanks for the example. Out of curiosity, what was the signature of your Next method? > I implemented a DB driver that had its own Next() method. Later I wante
by infogulch 12y ago
Thanks for the example. Out of curiosity, what was the signature of your Next method?
> I implemented a DB driver that had its own Next() method. Later I wanted to implement the SQL package interface.
(Did you mean the database/sql/driver driver.Rows interface[1]? sql.Rows is a struct not an interface.)
Just to be clear, you implemented a DB driver and then went to satisfy the driver interface? And this was after you already published it and would break backwards compatibility?
> especially as interfaces proliferate.
True. There will only be more interfaces over time. We'll want to keep them as small and descriptive as possible if we want the ecosystem to be sustainable.
[1]: https://golang.org/pkg/database/sql/driver/#Rows https://golang.org/pkg/database/sql/driver/#Rows