Skip to content
New issue

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

Return error message(s?) via JSON for vim-go #14

Closed
stapelberg opened this issue Jan 3, 2018 · 0 comments · Fixed by #19
Closed

Return error message(s?) via JSON for vim-go #14

stapelberg opened this issue Jan 3, 2018 · 0 comments · Fixed by #19

Comments

@stapelberg
Copy link
Owner

Split out of #1

From @fatih:

func foo() error {
	bar()

	// no return yet as I'm still developting this
}

func bar() error {
	return errors.New("foo")
}

When I put my cursor on top of bar() and call :GoExpandErr it returns an error saying:

2017/12/28 17:58:43 ignoring type-checking error: demo.go:54:1: missing return
{"start":51,"end":51,"lines":["\tif err := bar(); err != nil {","\t\treturn err","\t}"]}

It actually returns something. However this is wrong. The error should be part of json and we should be able to decide whether we can change the buffer or not. I think the error message above can be mitigated, but not sure how expanderr implemented it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant