Skip to content

Instantly share code, notes, and snippets.

@shanev
Last active January 22, 2019 04:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shanev/53f261482d709082c1259380d1f50177 to your computer and use it in GitHub Desktop.
Save shanev/53f261482d709082c1259380d1f50177 to your computer and use it in GitHub Desktop.
// RegisterModel creates a table for a type.
// A table is automatically created based on the passed in struct fields.
func (c *Client) RegisterModel(model interface{}) error {
return c.CreateTable(model, &orm.CreateTableOptions{
Temp: false,
IfNotExists: true,
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment