mirror of
https://github.com/hikhvar/mqtt2prometheus.git
synced 2026-08-23 21:16:15 +00:00
gofmt cmd/
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"flag"
|
||||
|
||||
"github.com/eclipse/paho.mqtt.golang"
|
||||
"github.com/hikhvar/mqtt2prometheus/pkg/metrics"
|
||||
"github.com/hikhvar/mqtt2prometheus/pkg/mqttclient"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"fmt"
|
||||
|
||||
"github.com/hikhvar/mqtt2prometheus/pkg/config"
|
||||
"github.com/hikhvar/mqtt2prometheus/pkg/metrics"
|
||||
"github.com/hikhvar/mqtt2prometheus/pkg/mqttclient"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -51,7 +53,7 @@ func main() {
|
||||
collector := metrics.NewCollector(cfg.Cache.Timeout, cfg.Metrics)
|
||||
ingest := metrics.NewIngest(collector, cfg.Metrics)
|
||||
|
||||
errorChan := make(chan error,1)
|
||||
errorChan := make(chan error, 1)
|
||||
|
||||
err = mqttclient.Subscribe(mqttClientOptions, mqttclient.SubscribeOptions{
|
||||
Topic: cfg.MQTT.TopicPath + "/+",
|
||||
|
||||
Reference in New Issue
Block a user