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
Here's an example excerpt of the generated code that no longer compiles I'm referencing:
...
func ShowHealthCheckOK(t goatest.TInterface, ctx context.Context, service *goa.Service, ctrl app.HealthCheckController) (http.ResponseWriter, *app.APIHealthcheck) {
// Setup service
var (
logBuf bytes.Buffer
resp interface{}
respSetter goatest.ResponseSetterFunc = func(r interface{}) { resp = r }
)
...
Steps to Reproduce the Problem (including complete and simple design if relevant)
Upgrade to Go 1.11
Generate a controller with goagen
Use test helper class in a unit test
Run test
When the app/foobar_controller_test.go files are being compiled by go test, vet fails the compilation.
app/test/auth0_testing.go:1098:3: resp declared but not used
app/test/auth0_testing.go:1021:3: resp declared but not used
app/test/auth0_testing.go:626:3: resp declared but not used
app/test/auth0_testing.go:317:3: resp declared but not used
app/test/auth0_testing.go:222:3: resp declared but not used
app/test/auth0_testing.go:127:3: resp declared but not used
app/test/auth0_testing.go:32:3: resp declared but not used
Specifications
goa Version: (goagen) 1.3.1
Platform (Linux/Windows etc.): Linux
The text was updated successfully, but these errors were encountered:
Expected Behavior
Goagen should produce test helpers that compile.
Actual Behavior
Under Go 1.11, the
resp
variable is no longer considered 'used' by the function closurerespSetter
in the generated code.It's part of a change of behavior of
go vet
under 1.11. Here's more info (under the "Test" heading": https://tip.golang.org/doc/go1.11#testHere's an example excerpt of the generated code that no longer compiles I'm referencing:
Steps to Reproduce the Problem (including complete and simple design if relevant)
When the app/foobar_controller_test.go files are being compiled by
go test
, vet fails the compilation.Specifications
The text was updated successfully, but these errors were encountered: