coopernurse/gorp — pull request #26 by meetmauro (2013-03-05 16:31:57+00:00)
Title: Field tags now allow you to declare a primary key or autoincrement field

With this patch you can declaratively say:

type Product struct {
Id int64 `db:"product_id" flags:"pk, autoincrement"`
Price int64 `db:"unit_price"`
IgnoreMe string `db:"-"`
}

so that your AddTableWithName will be simpler like:
t1 := dbmap.AddTableWithName(Invoice{}, "invoice_test")

instead of using SetKeys to specify keys on fields.