We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
(Edit: the below is using 10bff91)
This patch
@@ @@ func f() (...) { - fmt.Println("") + fmt.Println("hello") ... }
will match against
package foo func f() (string, error) { fmt.Println("") return "", nil }
but not
package foo func f() string { fmt.Println("") return "" }
I thought the parentheses were forcing more than one return type, so I tried patching without them
@@ @@ func f() ... { - return "" + return "hello" }
however this is not a valid patch:
load patch "repro": parse: repro/0.minus:1:11: found unexpected "..." inside *ast.FieldList
This isn't a big deal -- I can repeat the patch for 1 return type and N return types.
Intuitively, I would have thought "(...)" already represents "zero to N" return types, although I could also be totally misunderstanding the syntax!
The text was updated successfully, but these errors were encountered:
Fix uber-go#82 Elision: match 1 or more returned types
eb4de3f
Fix uber-go#82 Match 1 or more returned values, Stricter
b1c10b1
4770605
No branches or pull requests
(Edit: the below is using 10bff91)
This patch
will match against
but not
I thought the parentheses were forcing more than one return type, so I tried patching without them
however this is not a valid patch:
This isn't a big deal -- I can repeat the patch for 1 return type and N return types.
Intuitively, I would have thought "(...)" already represents "zero to N" return types, although I could also be totally misunderstanding the syntax!
The text was updated successfully, but these errors were encountered: