Re:How to Use Go Interfaces
by tptacek on Monday March 19, 2018 @10:15PM
(#16625455)
context also returns context.Context (an interface), and sql returns driver.Value, an interface.
[ Parent
| on HN ]
context.Context is an interface because it is known there are multiple implementers (several in the context package itself). The sql driver.Value is actually the other way around: the sql package is the consuming package (for the driver).