From 254c30cab05d450385d36c219d932729bc51085c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 30 Aug 2019 20:20:02 +0200 Subject: [PATCH] golint fixes --- experimental/bridge/opentracing/lib.go | 8 ++++---- .../tutorial-test/lesson04/formatter/formatter.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/experimental/bridge/opentracing/lib.go b/experimental/bridge/opentracing/lib.go index 9642355d7a09..420a6b16face 100644 --- a/experimental/bridge/opentracing/lib.go +++ b/experimental/bridge/opentracing/lib.go @@ -285,15 +285,15 @@ func (t *bridgeTracer) StartSpanWithContext(ctx context.Context, operationName s otelSpanContext: otelSpan.SpanContext(), } if bReference.spanContext != nil { - bReference.spanContext.ForeachBaggageItem(func (k, v string) bool { + bReference.spanContext.ForeachBaggageItem(func(k, v string) bool { sctx.setBaggageItem(k, v) return true }) } span := &bridgeSpan{ otelSpan: otelSpan, - ctx: sctx, - tracer: t, + ctx: sctx, + tracer: t, } ctx = ot.ContextWithSpan(ctx, span) @@ -450,7 +450,7 @@ func (t *bridgeTracer) Inject(sm ot.SpanContext, format interface{}, carrier int hhcarrier.Set(traceIDHeader, traceIDString(bridgeSC.otelSpanContext.TraceID)) hhcarrier.Set(spanIDHeader, spanIDToString(bridgeSC.otelSpanContext.SpanID)) hhcarrier.Set(traceOptionsHeader, traceOptionsToString(bridgeSC.otelSpanContext.TraceOptions)) - bridgeSC.ForeachBaggageItem(func (k, v string) bool { + bridgeSC.ForeachBaggageItem(func(k, v string) bool { // we assume that keys are already canonicalized hhcarrier.Set(baggageHeaderPrefix+k, v) return true diff --git a/experimental/bridge/opentracing/tutorial-test/lesson04/formatter/formatter.go b/experimental/bridge/opentracing/tutorial-test/lesson04/formatter/formatter.go index 3b251b28c65f..f2083c6dc189 100644 --- a/experimental/bridge/opentracing/tutorial-test/lesson04/formatter/formatter.go +++ b/experimental/bridge/opentracing/tutorial-test/lesson04/formatter/formatter.go @@ -40,7 +40,7 @@ func main() { otlog.String("event", "string-format"), otlog.String("value", helloStr), ) - w.Write([]byte(helloStr)) + _, _ = w.Write([]byte(helloStr)) }) log.Fatal(http.ListenAndServe(":8081", nil))