openfaas / connector-sdk

SDK for connecting events to functions
MIT License
54 stars 25 forks source link

Extract interface from 'types.Controller'. #33

Closed bmcustodio closed 4 years ago

bmcustodio commented 5 years ago

This PR extracts an interface from types.Controller in order to make it test-friendly for consumers of the SDK.

alexellis commented 4 years ago

This had conflicts, so I've merged and conflicts fixed, thank you @bmcstdio

bmcustodio commented 4 years ago

@alexellis thank you, but I don't think the conflicts were properly fixed:

https://github.com/openfaas-incubator/connector-sdk/blame/master/types/controller.go#L139

I am afraid 0.5.0 is unusable as it is:

(...)
# github.com/openfaas-incubator/connector-sdk/types
/go/pkg/mod/github.com/openfaas-incubator/connector-sdk@v0.0.0-20191016103615-1cf0f49095a2/types/controller.go:139:1: syntax error: non-declaration statement outside function body
/go/pkg/mod/github.com/openfaas-incubator/connector-sdk@v0.0.0-20191016103615-1cf0f49095a2/types/controller.go:141:1: syntax error: unexpected ==, expecting }
/go/pkg/mod/github.com/openfaas-incubator/connector-sdk@v0.0.0-20191016103615-1cf0f49095a2/types/controller.go:144:1: syntax error: unexpected >>, expecting }
(...)
alexellis commented 4 years ago

Feel free to send a follow-up pull request.

bmcustodio commented 4 years ago

@alexellis done. It was not the only issue, it seems.