mgutz / dat

Go Postgres Data Access Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why not have interface slice type for QueryStructs?

nathanleclaire opened this issue · comments

@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.

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