Enable all tests (fix #25)

This commit is contained in:
Manfred Touron
2017-03-16 15:41:09 +01:00
parent 191df6c8ec
commit 97cfa60fc8
21 changed files with 123 additions and 86 deletions

View File

@@ -1,14 +1,17 @@
package user_endpoints
import (
context "context"
"fmt"
"github.com/go-kit/kit/endpoint"
pb "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/user/gen/pb"
context "golang.org/x/net/context"
oldcontext "golang.org/x/net/context"
)
var _ = endpoint.Chain
var _ = fmt.Errorf
var _ = context.Background
type StreamEndpoint func(server interface{}, req interface{}) (err error)
@@ -18,7 +21,7 @@ type Endpoints struct {
GetUserEndpoint endpoint.Endpoint
}
func (e *Endpoints) CreateUser(ctx context.Context, in *pb.CreateUserRequest) (*pb.CreateUserResponse, error) {
func (e *Endpoints) CreateUser(ctx oldcontext.Context, in *pb.CreateUserRequest) (*pb.CreateUserResponse, error) {
out, err := e.CreateUserEndpoint(ctx, in)
if err != nil {
return &pb.CreateUserResponse{ErrMsg: err.Error()}, err
@@ -26,7 +29,7 @@ func (e *Endpoints) CreateUser(ctx context.Context, in *pb.CreateUserRequest) (*
return out.(*pb.CreateUserResponse), err
}
func (e *Endpoints) GetUser(ctx context.Context, in *pb.GetUserRequest) (*pb.GetUserResponse, error) {
func (e *Endpoints) GetUser(ctx oldcontext.Context, in *pb.GetUserRequest) (*pb.GetUserResponse, error) {
out, err := e.GetUserEndpoint(ctx, in)
if err != nil {
return &pb.GetUserResponse{ErrMsg: err.Error()}, err