-
Notifications
You must be signed in to change notification settings - Fork 9
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
Getting error " Failed to run gofmt on" #55
Comments
Hi Julian, I happen to use go gin library ( "https://github.com/gin-gonic/gin") .. Now when i was trying to run "withmock go test ", it threw the said error..Even after your fix, the problem persists.. |
------ Code for CloseNotify() ------- // Implements the http.CloseNotify interface ####################### func (_m *MockResponseWriter) CloseNotify() (http.<-chan bool) { ////////////////////////////////////////////////////////////////////////// If i change code , as in name the return paramater to say c below // Implements the http.CloseNotify interface withmock generates func (_m *MockResponseWriter) CloseNotify() <-chan bool { which i feel is proper But the problem is I get this error ERROR: EOF In essence it deletes code pieces in some packages, say i now get errors like
|
And forgot to mention, this is my go env ( i am basically using go lang version go version 'go1.5.3 linux/amd64' And my go env is GOARCH="amd64" |
ERROR: Failed to run gofmt on '/tmp/withmock769721486/path/src/github.com/gin-gonic/gin/gin_ifmocks.go': exit status 2
output:
/tmp/withmock769721486/path/src/github.com/gin-gonic/gin/gin_ifmocks.go:99:51: expected 'IDENT', found '<-'
/tmp/withmock769721486/path/src/github.com/gin-gonic/gin/gin_ifmocks.go:101:26: expected 'IDENT', found '<-'
This is what is there in gin_ifmocks.go file at line 99 through 103
func (_m *MockResponseWriter) CloseNotify() (http.<-chan bool) {
ret := _ctrl.Call(_m, "CloseNotify")
ret0, _ := ret[0].(http.<-chan bool)
return ret0
}
The text was updated successfully, but these errors were encountered: