Package list golang-github-go-kit-kit / e103562
examples: fix for invalid commit f307e26 Peter Bourgon 6 years ago
4 changed file(s) with 16 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
7474
7575 type uppercaseResponse struct {
7676 V string `json:"v"`
77 Err string `json:"err"` // errors don't define JSON marshaling
77 Err string `json:"err,omitempty"` // errors don't define JSON marshaling
7878 }
7979
8080 type countRequest struct {
5858 return func(ctx context.Context, request interface{}) (interface{}, error) {
5959 req := request.(uppercaseRequest)
6060 v, err := svc.Uppercase(req.S)
61 return uppercaseResponse{v, err.Error()}, nil
61 if err != nil {
62 return uppercaseResponse{v, err.Error()}, nil
63 }
64 return uppercaseResponse{v, ""}, nil
6265 }
6366 }
6467
9699
97100 type uppercaseResponse struct {
98101 V string `json:"v"`
99 Err string `json:"err"` // errors don't define JSON marshaling
102 Err string `json:"err,omitempty"` // errors don't define JSON marshaling
100103 }
101104
102105 type countRequest struct {
1212 return func(ctx context.Context, request interface{}) (interface{}, error) {
1313 req := request.(uppercaseRequest)
1414 v, err := svc.Uppercase(req.S)
15 return uppercaseResponse{v, err.Error()}, nil
15 if err != nil {
16 return uppercaseResponse{v, err.Error()}, nil
17 }
18 return uppercaseResponse{v, ""}, nil
1619 }
1720 }
1821
5053
5154 type uppercaseResponse struct {
5255 V string `json:"v"`
53 Err string `json:"err"`
56 Err string `json:"err,omitempty"`
5457 }
5558
5659 type countRequest struct {
1414 return func(ctx context.Context, request interface{}) (interface{}, error) {
1515 req := request.(uppercaseRequest)
1616 v, err := svc.Uppercase(req.S)
17 return uppercaseResponse{v, err.Error()}, nil
17 if err != nil {
18 return uppercaseResponse{v, err.Error()}, nil
19 }
20 return uppercaseResponse{v, ""}, nil
1821 }
1922 }
2023
6972
7073 type uppercaseResponse struct {
7174 V string `json:"v"`
72 Err string `json:"err"`
75 Err string `json:"err,omitempty"`
7376 }
7477
7578 type countRequest struct {