Skip to content

Commit

Permalink
PMM-13543 Address golangci review.
Browse files Browse the repository at this point in the history
  • Loading branch information
BupycHuk committed Nov 18, 2024
1 parent 0dd9dfd commit f7298e7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,12 @@ func buildExporter(opts GlobalFlags, uri string, log *logrus.Logger) *exporter.E

uriParsed, _ := url.Parse(uri)
var nodeName string
if uriParsed == nil {
switch {
case uriParsed == nil:
nodeName = ""
} else if uriParsed.Port() != "" {
case uriParsed.Port() != "":
nodeName = net.JoinHostPort(uriParsed.Hostname(), uriParsed.Port())
} else {
default:
nodeName = uriParsed.Host
}

Expand Down

0 comments on commit f7298e7

Please sign in to comment.