package bacheca import ( "context" proto "git.abbiamoundominio.org/hamcha/bacheca/proto" "github.com/go-kit/kit/endpoint" ) func getFeedEndpoint(svc Service) endpoint.Endpoint { return func(ctx context.Context, request interface{}) (interface{}, error) { req := request.(proto.GetFeedRequest) rsp := proto.GetFeedResponse{} err := svc.GetFeed(ctx, &req, &rsp) return rsp, err } }