You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because goreturns must typecheck, but goimports and gofmt only need to parse. It needs to typecheck because a statement like return foo() could be returning a single value or multiple values, depending on whether foo returns a single value or multiple values. That's a rare case, and I am considering just making it not fix any return f() statements. That would eliminate the need to typecheck.
I just upgraded to go 1.11, and now running goreturns takes more than the allowed 750 milliseconds:
By comparison,
gofmt
takes little over a tenth of a second:This is for a very simple file containing a single import:
I'm currently running
go version go1.11 windows/amd64
.The text was updated successfully, but these errors were encountered: