Codebase list golang-github-go-kit-kit / e0e1b24
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
5 changed file(s) with 8 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
4444 return handlerFn
4545 }
4646
47 func (i iface) reciever() *ast.Field {
47 func (i iface) receiver() *ast.Field {
4848 return field(i.receiverName(), i.stubName())
4949 }
5050
1616 notImpl := fetchFuncDecl("ExampleEndpoint")
1717
1818 notImpl.Name = m.name
19 notImpl.Recv = fieldList(ifc.reciever())
19 notImpl.Recv = fieldList(ifc.receiver())
2020 scope := scopeWith(notImpl.Recv.List[0].Names[0].Name)
2121 notImpl.Type.Params = m.funcParams(scope)
2222 notImpl.Type.Results = m.funcResults()
4141
4242 endpointFn.Body.List[0].(*ast.ReturnStmt).Results[0] = anonFunc
4343 endpointFn.Name = m.endpointMakerName()
44 endpointFn.Type.Params = fieldList(ifc.reciever())
44 endpointFn.Type.Params = fieldList(ifc.receiver())
4545 endpointFn.Type.Results = fieldList(typeField(sel(id("endpoint"), id("Endpoint"))))
4646 return endpointFn
4747 }
3939 // Option is a function adapter to change config of the CloudWatch struct
4040 type Option func(*CloudWatch)
4141
42 // WithLogger sets the Logger that will recieve error messages generated
42 // WithLogger sets the Logger that will receive error messages generated
4343 // during the WriteLoop. By default, no logger is used.
4444 func WithLogger(logger log.Logger) Option {
4545 return func(cw *CloudWatch) {
99 "reflect"
1010 "testing"
1111
12 "github.com/openzipkin/zipkin-go"
12 zipkin "github.com/openzipkin/zipkin-go"
1313 "github.com/openzipkin/zipkin-go/model"
1414 "github.com/openzipkin/zipkin-go/propagation/b3"
1515 "github.com/openzipkin/zipkin-go/reporter/recorder"
165165 rec := recorder.NewReporter()
166166 defer rec.Close()
167167
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
169169 // is idiomatic for Zipkin to share span identifiers between client and
170170 // server side.
171171 tr, _ := zipkin.NewTracer(rec, zipkin.WithSharedSpans(true))
11
22 import (
33 "context"
4
45 "github.com/streadway/amqp"
56 )
67
1213 // an AMQP Publishing object. It is designed to be used in AMQP Publishers.
1314 type EncodeRequestFunc func(context.Context, *amqp.Publishing, interface{}) error
1415
15 // EncodeResponseFunc encodes the passed reponse object to
16 // EncodeResponseFunc encodes the passed response object to
1617 // an AMQP Publishing object. It is designed to be used in AMQP Subscribers.
1718 type EncodeResponseFunc func(context.Context, *amqp.Publishing, interface{}) error
1819