From cb8b63828d655c8564ed7254e1ad9dea2fa618b3 Mon Sep 17 00:00:00 2001 From: Davor Kapsa Date: Tue, 20 Nov 2018 19:12:54 +0100 Subject: [PATCH 1/5] fix receiver misspell --- cmd/kitgen/interface.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kitgen/interface.go b/cmd/kitgen/interface.go index 0c984dfca..6b7fcd75a 100644 --- a/cmd/kitgen/interface.go +++ b/cmd/kitgen/interface.go @@ -45,7 +45,7 @@ func (i iface) httpHandler() ast.Decl { return handlerFn } -func (i iface) reciever() *ast.Field { +func (i iface) receiver() *ast.Field { return field(i.receiverName(), i.stubName()) } From b47db80824a1b89af81ddc345595fb37d2f1d519 Mon Sep 17 00:00:00 2001 From: Davor Kapsa Date: Tue, 20 Nov 2018 19:15:52 +0100 Subject: [PATCH 2/5] fix receive misspell --- metrics/cloudwatch2/cloudwatch2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metrics/cloudwatch2/cloudwatch2.go b/metrics/cloudwatch2/cloudwatch2.go index 4d006675e..5204764d7 100644 --- a/metrics/cloudwatch2/cloudwatch2.go +++ b/metrics/cloudwatch2/cloudwatch2.go @@ -40,7 +40,7 @@ type CloudWatch struct { // Option is a function adapter to change config of the CloudWatch struct type Option func(*CloudWatch) -// WithLogger sets the Logger that will recieve error messages generated +// WithLogger sets the Logger that will receive error messages generated // during the WriteLoop. By default, no logger is used. func WithLogger(logger log.Logger) Option { return func(cw *CloudWatch) { From bc6fd32b974aac15f22e94c700237b4c710023a7 Mon Sep 17 00:00:00 2001 From: Davor Kapsa Date: Tue, 20 Nov 2018 19:17:38 +0100 Subject: [PATCH 3/5] fix explicitly misspell --- tracing/zipkin/http_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracing/zipkin/http_test.go b/tracing/zipkin/http_test.go index 5a154e4d8..64c94439f 100644 --- a/tracing/zipkin/http_test.go +++ b/tracing/zipkin/http_test.go @@ -10,7 +10,7 @@ import ( "reflect" "testing" - "github.com/openzipkin/zipkin-go" + zipkin "github.com/openzipkin/zipkin-go" "github.com/openzipkin/zipkin-go/model" "github.com/openzipkin/zipkin-go/propagation/b3" "github.com/openzipkin/zipkin-go/reporter/recorder" @@ -166,7 +166,7 @@ func TestHTTPServerTrace(t *testing.T) { rec := recorder.NewReporter() defer rec.Close() - // explicitely show we use the default of RPC shared spans in Zipkin as it + // explicitly show we use the default of RPC shared spans in Zipkin as it // is idiomatic for Zipkin to share span identifiers between client and // server side. tr, _ := zipkin.NewTracer(rec, zipkin.WithSharedSpans(true)) From a6783ead81d249e1237699b77c5083d4c1ee3c6b Mon Sep 17 00:00:00 2001 From: Davor Kapsa Date: Tue, 20 Nov 2018 19:19:22 +0100 Subject: [PATCH 4/5] fix response misspell --- transport/amqp/encode-decode.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transport/amqp/encode-decode.go b/transport/amqp/encode-decode.go index 304731812..cfa1446a3 100644 --- a/transport/amqp/encode-decode.go +++ b/transport/amqp/encode-decode.go @@ -2,6 +2,7 @@ package amqp import ( "context" + "github.com/streadway/amqp" ) @@ -13,7 +14,7 @@ type DecodeRequestFunc func(context.Context, *amqp.Delivery) (request interface{ // an AMQP Publishing object. It is designed to be used in AMQP Publishers. type EncodeRequestFunc func(context.Context, *amqp.Publishing, interface{}) error -// EncodeResponseFunc encodes the passed reponse object to +// EncodeResponseFunc encodes the passed response object to // an AMQP Publishing object. It is designed to be used in AMQP Subscribers. type EncodeResponseFunc func(context.Context, *amqp.Publishing, interface{}) error From ab2d233575bdd0e5d9c1e07c16a1e15fc91536c2 Mon Sep 17 00:00:00 2001 From: Davor Kapsa Date: Tue, 20 Nov 2018 19:33:38 +0100 Subject: [PATCH 5/5] fix receiver method call --- cmd/kitgen/method.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/kitgen/method.go b/cmd/kitgen/method.go index f7a6da1b0..6a040816b 100644 --- a/cmd/kitgen/method.go +++ b/cmd/kitgen/method.go @@ -17,7 +17,7 @@ func (m method) definition(ifc iface) ast.Decl { notImpl := fetchFuncDecl("ExampleEndpoint") notImpl.Name = m.name - notImpl.Recv = fieldList(ifc.reciever()) + notImpl.Recv = fieldList(ifc.receiver()) scope := scopeWith(notImpl.Recv.List[0].Names[0].Name) notImpl.Type.Params = m.funcParams(scope) notImpl.Type.Results = m.funcResults() @@ -42,7 +42,7 @@ func (m method) endpointMaker(ifc iface) ast.Decl { endpointFn.Body.List[0].(*ast.ReturnStmt).Results[0] = anonFunc endpointFn.Name = m.endpointMakerName() - endpointFn.Type.Params = fieldList(ifc.reciever()) + endpointFn.Type.Params = fieldList(ifc.receiver()) endpointFn.Type.Results = fieldList(typeField(sel(id("endpoint"), id("Endpoint")))) return endpointFn }