如何将结构指针转换为go中的类型指针列表

I have a struct that looks like:

type inv struct {
    ID   int     `json:"id"`
    Name string  `json:"name"`
}

I'm querying some data from the database(assuming there are no errors):

rows, err := db.Query("select id, name from inv_table")

Normally, I'd have to pull the data from the row by scanning

var i inv
for rows.Next() {
    rows.Scan(&i.ID, &i.Name)
}

I think this might work (to be tested tomorrow):

var i inv
for rows.Next() {
    var x []interface{} = [&i.ID, &i.Name]
    rows.Scan(x... )
}

In actuality I have many more columns in the result set from the query.

rows.Scan(&i)

or at least:

rows.Scan(getExportedValuePointers(&i)... )

I suppose I could always write some sort of encoder, however, it seems to me that there should be something in the box already.

** I realize that I could always write some reflection code similar to the encode/xml or encode/json ... but I'm hoping that someone has already done it.

UPDATE: The following code works as expected but not as I want:

package main
import "fmt"
type inv struct {
    A int
    B string
}
func main() {
    var i inv
    fmt.Printf("hello
")
    n, err := fmt.Sscan("1 c", &i.A, &i.B)
    fmt.Printf("retval: %d %#v
", n, err)
    fmt.Printf("retval: %d, %s, %d %#v
", i.A, i.B, n, err)
    j := []interface{}{&i.A, &i.B}
    k := []interface{}{i.A, i.B}
    n, err = fmt.Sscan("2 d", j... )
    fmt.Printf("retval: %d, %s, %d %#v
", i.A, i.B, n, err)
    fmt.Printf("retval: %d, %s
", k... )
}

If you're looking for a package that will automatically bind your SQL query to your "inv" struct then take a look at gorp:

https://github.com/coopernurse/gorp

There is nothing to do this automatically, but you could write a function using the reflect package to do it.