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
Split out of #1
From @fatih:
func foo() { // I want to panic here bar() } func bar() error { return errors.New("foo") }
When I call :GoExpandErr when my cursor is on bar()~ inside foo()` I got this error:
:GoExpandErr
bar()~ inside
2017/12/28 18:04:49 current function returns no values, cannot return error
I think if there are no returns, it should default to panic(err.Error()) or something alike.
panic(err.Error())
The text was updated successfully, but these errors were encountered:
It’s not entirely clear to me whether we should panic, log.Fatal (which is what I prefer to use), or even make this configurable. Thoughts?
panic
log.Fatal
Sorry, something went wrong.
Could this be a setting maybe that user can define? I'm not sure how feasible it would be, but worth trying it out.
I think we could allow users to specify a Go template expression.
This should be a reasonably easy task for newcomers to contribute to the project. Applied the help wanted label.
Successfully merging a pull request may close this issue.
Split out of #1
From @fatih:
When I call
:GoExpandErr
when my cursor is onbar()~ inside
foo()` I got this error:I think if there are no returns, it should default to
panic(err.Error())
or something alike.The text was updated successfully, but these errors were encountered: