Skip to content

unclosetx: not detect when a function called with a ReadOnlyTransaction argument #49

Description

@uechoco

unclosetx cannot detect looks like this sample code.

func f7(ctx context.Context, client *spanner.Client) error {
	ro := client.ReadOnlyTransaction()
	err := Find01(ctx, ro)
	return err
}

func Find01(ctx context.Context, ro *spanner.ReadOnlyTransaction) error {
	row, err := ro.ReadRow(ctx, "DummyTable", spanner.Key{1}, []string{"Id"})
	log.Printf("row: %s", row)
	return err
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions