value shall be string
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/tag/woodpecker Pipeline failed

This commit is contained in:
Wolfgang Hottgenroth 2025-02-10 14:18:19 +01:00
parent 64dba890dd
commit 553648e10d

View File

@ -3,6 +3,7 @@ package tsmq
import ( import (
"log" "log"
"time" "time"
"strconv"
"encoding/json" "encoding/json"
"tsm/config" "tsm/config"
@ -14,7 +15,7 @@ import (
type variable_t struct { type variable_t struct {
Label string `json:"label"` Label string `json:"label"`
Variable string `json:"variable"` Variable string `json:"variable"`
Value float64 `json:"value"` Value string `json:"value"`
Unit string `json:"unit"` Unit string `json:"unit"`
Status string `json:"status"` Status string `json:"status"`
} }
@ -51,7 +52,7 @@ func Start() {
v := variable_t { v := variable_t {
Label: label, Label: label,
Variable: "", Variable: "",
Value: value, Value: strconv.FormatFloat(value, 'f', 4, 64)
Unit: "ms", Unit: "ms",
Status: status, Status: status,
} }