Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
tptacek
· 8y ago · 0 comments
context also returns context.Context (an interface), and sql returns driver.Value, an interface.
Comments
[–]
dsymonds
8y ago
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).