Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
uechoco opened this issue Sep 16, 2022 · 0 comments

Comments

@uechoco
Copy link

uechoco commented Sep 16, 2022

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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant