diff --git a/exporter/trace/jaeger/internal/gen-go/jaeger/collector-remote/collector-remote.go b/exporter/trace/jaeger/internal/gen-go/jaeger/collector-remote/collector-remote.go index 35420247aca..822292072c6 100755 --- a/exporter/trace/jaeger/internal/gen-go/jaeger/collector-remote/collector-remote.go +++ b/exporter/trace/jaeger/internal/gen-go/jaeger/collector-remote/collector-remote.go @@ -14,8 +14,9 @@ import ( "strconv" "strings" - "go.opentelemetry.io/exporter/trace/jaeger/internal/gen-go/jaeger" "github.com/apache/thrift/lib/go/thrift" + + "go.opentelemetry.io/exporter/trace/jaeger/internal/gen-go/jaeger" ) func Usage() { @@ -34,8 +35,8 @@ func main() { var protocol string var urlString string var framed bool - var useHttp bool - var parsedUrl *url.URL + var useHTTP bool + var parsedURL *url.URL var trans thrift.TTransport _ = strconv.Atoi _ = math.Abs @@ -45,19 +46,19 @@ func main() { flag.StringVar(&protocol, "P", "binary", "Specify the protocol (binary, compact, simplejson, json)") flag.StringVar(&urlString, "u", "", "Specify the url") flag.BoolVar(&framed, "framed", false, "Use framed transport") - flag.BoolVar(&useHttp, "http", false, "Use http") + flag.BoolVar(&useHTTP, "http", false, "Use http") flag.Parse() if len(urlString) > 0 { var err error - parsedUrl, err = url.Parse(urlString) + parsedURL, err = url.Parse(urlString) if err != nil { fmt.Fprintln(os.Stderr, "Error parsing URL: ", err) flag.Usage() } - host = parsedUrl.Host - useHttp = len(parsedUrl.Scheme) <= 0 || parsedUrl.Scheme == "http" - } else if useHttp { + host = parsedURL.Host + useHTTP = len(parsedURL.Scheme) <= 0 || parsedURL.Scheme == "http" + } else if useHTTP { _, err := url.Parse(fmt.Sprint("http://", host, ":", port)) if err != nil { fmt.Fprintln(os.Stderr, "Error parsing URL: ", err) @@ -67,8 +68,8 @@ func main() { cmd := flag.Arg(0) var err error - if useHttp { - trans, err = thrift.NewTHttpClient(parsedUrl.String()) + if useHTTP { + trans, err = thrift.NewTHttpClient(parsedURL.String()) } else { portStr := fmt.Sprint(port) if strings.Contains(host, ":") { diff --git a/propagation/http_b3_propagator_data_test.go b/propagation/http_b3_propagator_data_test.go index 1dab46d2d19..b58cf2cb122 100644 --- a/propagation/http_b3_propagator_data_test.go +++ b/propagation/http_b3_propagator_data_test.go @@ -542,4 +542,4 @@ var injectB3SingleleHeader = []injectTest{ propagation.B3ParentSpanIDHeader, }, }, -} \ No newline at end of file +} diff --git a/propagation/http_b3_propagator_test.go b/propagation/http_b3_propagator_test.go index a793328594e..5af14667078 100644 --- a/propagation/http_b3_propagator_test.go +++ b/propagation/http_b3_propagator_test.go @@ -143,7 +143,7 @@ func TestHTTPB3Propagator_GetAllKeys(t *testing.T) { } } -func TestHttpB3PropagatorWithSingleHeader_GetAllKeys(t *testing.T) { +func TestHTTPB3PropagatorWithSingleHeader_GetAllKeys(t *testing.T) { propagator := propagation.HTTPB3Propagator{true} want := []string{ propagation.B3SingleHeader, diff --git a/propagation/http_trace_context_propagator_test.go b/propagation/http_trace_context_propagator_test.go index 81d7557f44c..612233c75b9 100644 --- a/propagation/http_trace_context_propagator_test.go +++ b/propagation/http_trace_context_propagator_test.go @@ -466,7 +466,7 @@ func TestInjectCorrelationContextToHTTPReq(t *testing.T) { } } -func TestHttpTraceContextPropagator_GetAllKeys(t *testing.T) { +func TestHTTPTraceContextPropagator_GetAllKeys(t *testing.T) { var propagator propagation.HTTPTraceContextPropagator want := []string{"Traceparent", "Correlation-Context"} got := propagator.GetAllKeys()