code: func Transaction(f func(tx sqlx.Ext) error) error {
  	tx, err := db.Beginx()
  	if err != nil {
  		return errors.Wrap(err, "storage: begin transaction error")
  	}
  
  	err = f(tx)
  	if err != nil {
  		if rbErr := tx.Rollback(); rbErr != nil {
  			return errors.Wrap(rbErr, "storage: transaction rollback error")
  		}
  		return err
  	}
  
  	if err := tx.Commit(); err != nil {
  		return errors.Wrap(err, "storage: transaction commit error")
  	}
  	return nil
  }
docs: // Transaction wraps the given function in a transaction. In case the given
  // functions returns an error, the transaction will be rolled back.