-
Notifications
You must be signed in to change notification settings - Fork 646
New iferr
snippets on 0.6.90-beta.9
#1962
Comments
@uudashr Good point cc @alecthomas who made the update. @alecthomas We could revert the change to the |
I wanted to release the update today, so I have reverted the change to We can continue the discussion here though. |
I just press the "select line" key combo and start typing in this situation. Another alternative would be to have a completion fragment cover the whole return, as well as the sub-parts. But it's already been reverted so 🤷♂️ |
You mean like this:
|
Got clue from @alecthomas |
This is fixed in the latest update to the Go extension (0.6.91) |
vscode-go version: 0.6.90-beta.9
The new
iferr
snippet expand to:I'm not seeing this as generic cases. We are not always need
return nil, err
orreturn err
which covered by the new snippet, but for testing purpose such ast.Error(err)
need extra works. Is there a workaround to accommodate for such non-returning statement case. Since unit test are also important deliveries.Give it a try, type below code using
iferr
snippet:The text was updated successfully, but these errors were encountered: