Ayiga / go-kit-middlewarer

A utility for generating layers for the go-kit framework
MIT License
85 stars 9 forks source link

there is a compile error in the example "stringsvc" #10

Open fish2016 opened 7 years ago

fish2016 commented 7 years ago

the parameter "context.Context" isn't the first parameter of NewServer(),

please check it.

the following is the compile error:

github.com/ayiga/go-kit-middlewarer/examples/stringsvc/transport/http ....\transport\http\http-server_gen.go:53: too many arguments in call to "github.com/go-kit/kit/transport/http".NewServer have (context.Context, "github.com/go-kit/kit/endpoint".Endpoint, "github.com/go-kit/kit/transport/http".DecodeRequestFunc, "github.com/go-kit/kit/transport/http".EncodeResponseFunc, []"github.com/go-kit/kit/transport/http".ServerOption...) want ("github.com/go-kit/kit/endpoint".Endpoint, "github.com/go-kit/kit/transport/http".DecodeRequestFunc, "github.com/go-kit/kit/transport/http".EncodeResponseFunc, ..."github.com/go-kit/kit/transport/http".ServerOption)

Ayiga commented 7 years ago

Oh no. It looks like go-kit was updated so that it's http transport no longer takes a context. That should be quite easy to fix. Sorry about not seeing this sooner. Unfortunately, I don't get a lot of time to work on golang micro-services lately.

I'll fix this issue right away though.

Ayiga commented 7 years ago

This should be resolved now. Via this commit:

https://github.com/Ayiga/go-kit-middlewarer/commit/4e5baed422b7ef556dabc4848d6008875ad17efc

Please let me know if you come across anything else.