diff --git a/.golangci.yml b/.golangci.yml index 32237518db1..afb649ba84d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -189,9 +189,6 @@ linters-settings: # TBD - often triggered in tests - name: unhandled-error disabled: true - # this one looks like it's catching real errors, need to enable it - - name: modifies-value-receiver - disabled: true # often looks like a red herring, needs investigation - name: flag-parameter disabled: true diff --git a/cmd/agent/app/builder.go b/cmd/agent/app/builder.go index f1891839466..91c40ee2f85 100644 --- a/cmd/agent/app/builder.go +++ b/cmd/agent/app/builder.go @@ -167,10 +167,11 @@ func (b *Builder) getProcessors(rep reporter.Reporter, mFactory metrics.Factory, // GetHTTPServer creates an HTTP server that provides sampling strategies and baggage restrictions to client libraries. func (c HTTPServerConfiguration) getHTTPServer(manager configmanager.ClientConfigManager, mFactory metrics.Factory, logger *zap.Logger) *http.Server { - if c.HostPort == "" { - c.HostPort = defaultHTTPServerHostPort + hostPort := c.HostPort + if hostPort == "" { + hostPort = defaultHTTPServerHostPort } - return httpserver.NewHTTPServer(c.HostPort, manager, mFactory, logger) + return httpserver.NewHTTPServer(hostPort, manager, mFactory, logger) } // GetThriftProcessor gets a TBufferedServer backed Processor using the collector configuration diff --git a/model/dependencies.go b/model/dependencies.go index d1a86ba0d7c..d60bbb18f41 100644 --- a/model/dependencies.go +++ b/model/dependencies.go @@ -22,8 +22,9 @@ const ( // ApplyDefaults applies defaults to the DependencyLink. func (d DependencyLink) ApplyDefaults() DependencyLink { - if d.Source == "" { - d.Source = JaegerDependencyLinkSource + dd := d + if dd.Source == "" { + dd.Source = JaegerDependencyLinkSource } - return d + return dd }