Defining an interface which accepts an optional value causes the code generation to fail with this error:
Error: generate code: error formatting generated code: 61:1: expected declaration, found '%' (and 10 more errors)
Line 61 of the generated code:
%!v(PANIC=GoString method: Error 119:42: missing ',' in parameter list while formatting source:
The source is formatted using gofmt
Additional context: the issue only arises, if another function in the same interface requires a context argument.
To reproduce: repo containing the extended example code from the interfaces documentation:
https://github.com/puzzle/dagger-interface-example