x/pkgsite: CreateOrder example on go.dev/doc/database/execute-transactions page doesn't compile #50508
Labels
Documentation
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What is the URL of the page with the issue?
https://go.dev/doc/database/execute-transactions
What is your user agent?
Firefox 94.0 (64-bit)
Screenshot
The
fail
function (below the marked comment), expects 2 return values. However, the function only returnsfmt.Errorf(...)
.What did you do?
I copy-pasted the code to my IDE (VS Code) and got an error (the
return
line was marked with a red line).What did you expect to see?
There should be no error in the copy-pasted function. It should return, maybe,
0, fmt.Errorf(...)
?What did you see instead?
Error during compilation.
I'm new to Go, so please let me know if I did something wrong instead. Thanks!
The text was updated successfully, but these errors were encountered: