Fix few misspells (#797)
* fix receiver misspell
* fix receive misspell
* fix explicitly misspell
* fix response misspell
* fix receiver method call
Davor Kapsa authored 4 years ago
Chris Hines committed 4 years ago
44 | 44 |
return handlerFn
|
45 | 45 |
}
|
46 | 46 |
|
47 | |
func (i iface) reciever() *ast.Field {
|
|
47 |
func (i iface) receiver() *ast.Field {
|
48 | 48 |
return field(i.receiverName(), i.stubName())
|
49 | 49 |
}
|
50 | 50 |
|
16 | 16 |
notImpl := fetchFuncDecl("ExampleEndpoint")
|
17 | 17 |
|
18 | 18 |
notImpl.Name = m.name
|
19 | |
notImpl.Recv = fieldList(ifc.reciever())
|
|
19 |
notImpl.Recv = fieldList(ifc.receiver())
|
20 | 20 |
scope := scopeWith(notImpl.Recv.List[0].Names[0].Name)
|
21 | 21 |
notImpl.Type.Params = m.funcParams(scope)
|
22 | 22 |
notImpl.Type.Results = m.funcResults()
|
|
41 | 41 |
|
42 | 42 |
endpointFn.Body.List[0].(*ast.ReturnStmt).Results[0] = anonFunc
|
43 | 43 |
endpointFn.Name = m.endpointMakerName()
|
44 | |
endpointFn.Type.Params = fieldList(ifc.reciever())
|
|
44 |
endpointFn.Type.Params = fieldList(ifc.receiver())
|
45 | 45 |
endpointFn.Type.Results = fieldList(typeField(sel(id("endpoint"), id("Endpoint"))))
|
46 | 46 |
return endpointFn
|
47 | 47 |
}
|
39 | 39 |
// Option is a function adapter to change config of the CloudWatch struct
|
40 | 40 |
type Option func(*CloudWatch)
|
41 | 41 |
|
42 | |
// WithLogger sets the Logger that will recieve error messages generated
|
|
42 |
// WithLogger sets the Logger that will receive error messages generated
|
43 | 43 |
// during the WriteLoop. By default, no logger is used.
|
44 | 44 |
func WithLogger(logger log.Logger) Option {
|
45 | 45 |
return func(cw *CloudWatch) {
|
9 | 9 |
"reflect"
|
10 | 10 |
"testing"
|
11 | 11 |
|
12 | |
"github.com/openzipkin/zipkin-go"
|
|
12 |
zipkin "github.com/openzipkin/zipkin-go"
|
13 | 13 |
"github.com/openzipkin/zipkin-go/model"
|
14 | 14 |
"github.com/openzipkin/zipkin-go/propagation/b3"
|
15 | 15 |
"github.com/openzipkin/zipkin-go/reporter/recorder"
|
|
165 | 165 |
rec := recorder.NewReporter()
|
166 | 166 |
defer rec.Close()
|
167 | 167 |
|
168 | |
// explicitely show we use the default of RPC shared spans in Zipkin as it
|
|
168 |
// explicitly show we use the default of RPC shared spans in Zipkin as it
|
169 | 169 |
// is idiomatic for Zipkin to share span identifiers between client and
|
170 | 170 |
// server side.
|
171 | 171 |
tr, _ := zipkin.NewTracer(rec, zipkin.WithSharedSpans(true))
|
1 | 1 |
|
2 | 2 |
import (
|
3 | 3 |
"context"
|
|
4 |
|
4 | 5 |
"github.com/streadway/amqp"
|
5 | 6 |
)
|
6 | 7 |
|
|
12 | 13 |
// an AMQP Publishing object. It is designed to be used in AMQP Publishers.
|
13 | 14 |
type EncodeRequestFunc func(context.Context, *amqp.Publishing, interface{}) error
|
14 | 15 |
|
15 | |
// EncodeResponseFunc encodes the passed reponse object to
|
|
16 |
// EncodeResponseFunc encodes the passed response object to
|
16 | 17 |
// an AMQP Publishing object. It is designed to be used in AMQP Subscribers.
|
17 | 18 |
type EncodeResponseFunc func(context.Context, *amqp.Publishing, interface{}) error
|
18 | 19 |
|