Skip to content

Add ability to check closing of transactions #2

@agnivade

Description

@agnivade

Hi, thanks for creating this. I would love to use this tool if this supports checking transactions too. Usually, rows.Close() is something that is not missed. But I miss closing transactions often.

I would want to check that transactions are always either committed or rolled back before the function returns.

Something like

tx, err := db.Begin()
if err != nil {
	return err
}
err = doSomething()
if err != nil {
	tx.Rollback()
	return err
}
return nil // error !! We are not doing tx.Commit() before returning.

Will it be possible to add something like this ? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions