mirror of
https://github.com/hikhvar/mqtt2prometheus.git
synced 2026-02-14 18:09:53 +00:00
Fix Sprintf
This commit is contained in:
@@ -132,7 +132,7 @@ func mustShowVersion() {
|
||||
func mustMQTTClientID() string {
|
||||
host, err := os.Hostname()
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("failed to get hostname: %w", err))
|
||||
panic(fmt.Sprintf("failed to get hostname: %v", err))
|
||||
}
|
||||
pid := os.Getpid()
|
||||
return fmt.Sprintf("%s-%d", host, pid)
|
||||
|
||||
Reference in New Issue
Block a user