mgutz / dat

Go Postgres Data Access Toolkit
Other
612 stars 62 forks source link

Why not have interface slice type for QueryStructs? #40

Closed nathanleclaire closed 8 years ago

nathanleclaire commented 8 years ago

@mgutz

Hi thanks for the excellent lib. I was wondering if there's a reason why Execer -> QueryStructs accepts interface{} instead of []interface{}. It should be pretty safe to assume a slice should always be passed to this method and I originally had mistyped it as just QueryStruct leading to a quite confusing error at runtime. If we can detect this type of mistake at compile time it will be much better.

nathanleclaire commented 8 years ago

I'm a dummy, there's no such thing as []interface{}. Thanks.