Skip to content

Instantly share code, notes, and snippets.

@hauxe
Created June 17, 2018 04:42
Show Gist options
  • Save hauxe/75122be5243776575c3490e41791f68b to your computer and use it in GitHub Desktop.
Save hauxe/75122be5243776575c3490e41791f68b to your computer and use it in GitHub Desktop.
crud update part
// Update update data
func (crud *CRUD) Update(data interface{}) error {
_, err := crud.Config.DB.NamedExec(crud.Config.sqlCRUDUpdate, data)
if err != nil {
return errors.Wrap(err, "error crud update")
}
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment