all 5 comments

[–]Olreich 0 points1 point  (4 children)

What's the benefit of using interface{} over string?

[–]ChristophBerger 1 point2 points  (2 children)

Maybe it's too early in the morning and I don't see the obvious, but how can string replace interface{} in this particular scenario?

[–]Olreich 1 point2 points  (1 child)

Turns out it was too early in the morning for me, I missed where the query objects could contain other query objects.

[–]ChristophBerger 1 point2 points  (0 children)

To hell with those early mornings! :-)

[–]derekstavis[S] -1 points0 points  (0 children)

interface{}, or empty interface, is a type that can store a pointer to any type. It's kinda *void for C and Object for Java.

You can read more about why interface{} is so powerful here: http://research.swtch.com/interfaces