Skip to content

Commit

Permalink
Remove duplicated if
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Thiesen <lucas.thiesen@zalando.de>
  • Loading branch information
lucastt committed May 2, 2023
1 parent ad49f6f commit 6142ab0
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/collector/hostname_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ func (p *HostnameCollectorPlugin) NewCollector(
// Need to copy config and add a promQL query in order to get
// RPS data from a specific hostname from prometheus. The idea
// of the copy is to not modify the original config struct.
if config == nil {
return nil, fmt.Errorf("Metric config not present, it is not possible to initialize the collector.")
}

confCopy := *config
hostname := config.Config["hostname"]

Expand Down

0 comments on commit 6142ab0

Please sign in to comment.