You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to gorp and following the QuickStart. I found db tag is not working. The column for field Title becomes ,size:50 instead of Title. The column for field Body becomes article_body,size:1024 instead of article_body. My dev env: OS X Yosemite, golang 1.5.
type Post struct {
// db tag lets you specify the column name if it differs from the struct field
Id int64 `db:"post_id"`
Created int64
Title string `db:",size:50"` // Column size set to 50
Body string `db:"article_body,size:1024"` // Set both column name and size
}
@qrawl I suggest we modify the Quickstart, because new users like me do not know this rule. They just follow the steps in README but find the code does not work as expected. Thanks.
I am new to gorp and following the QuickStart. I found db tag is not working. The column for field
Title
becomes,size:50
instead ofTitle
. The column for fieldBody
becomesarticle_body,size:1024
instead ofarticle_body
. My dev env: OS X Yosemite, golang 1.5.The text was updated successfully, but these errors were encountered: