refactor: cleaning up some old issues and stndardizing.

This commit is contained in:
James Wells 2023-03-20 16:00:15 -07:00
parent b95d3950c5
commit 8640d42132
Signed by: jwells
GPG key ID: 73196D10B8E65666
6 changed files with 190 additions and 113 deletions

View file

@ -1,10 +1,10 @@
package main
import (
fmt "fmt"
log "log"
http "net/http"
os "os"
strconv "strconv"
sync "sync"
autorestart "github.com/slayer/autorestart"
@ -290,7 +290,7 @@ func init() {
if config.MonitorPort != 0 {
go func() {
log.Printf("[INFO] Starting Prometheus metrics exporter on port %d\n", config.MonitorPort)
log.Fatal(http.ListenAndServe(fmt.Sprintf("%s:%d", config.ListenAddr, config.MonitorPort), nil))
log.Fatal(http.ListenAndServe(string(config.ListenAddr)+strconv.FormatInt(config.MonitorPort, 10), nil))
}()
}
}