What is the URL of the page with the issue?
https://go.dev/doc/database/execute-transactions
What is your user agent?
Should not matter.
[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36](https://developers.whatismybrowser.com/useragents/parse/?analyse-my-user-agent=yes)
Screenshot

What did you do?
Tried to run the highlighted part of the example code:
// Create a helper function for preparing failure results.
fail := func(err error) (int64, error) {
return fmt.Errorf("CreateOrder: %v", err)
}
The code declares a function variable that should return two results (int64 and error), but the implementation returns only error. This leads to compilation error.
What did you expect to see?
I expected that the code would compile without any errors.
What did you see instead?
Compiling the code results in error:
./prog.go:10:3: not enough arguments to return
have (error)
want (int64, error)
I was not able to find where the code lives, otherwise I'd be happy to send a PR.
What is the URL of the page with the issue?
https://go.dev/doc/database/execute-transactions
What is your user agent?
Should not matter.
Screenshot
What did you do?
Tried to run the highlighted part of the example code:
The code declares a function variable that should return two results (int64 and error), but the implementation returns only error. This leads to compilation error.
What did you expect to see?
I expected that the code would compile without any errors.
What did you see instead?
Compiling the code results in error:
I was not able to find where the code lives, otherwise I'd be happy to send a PR.