value shall be string
This commit is contained in:
parent
64dba890dd
commit
553648e10d
@ -3,6 +3,7 @@ package tsmq
|
||||
import (
|
||||
"log"
|
||||
"time"
|
||||
"strconv"
|
||||
"encoding/json"
|
||||
|
||||
"tsm/config"
|
||||
@ -14,7 +15,7 @@ import (
|
||||
type variable_t struct {
|
||||
Label string `json:"label"`
|
||||
Variable string `json:"variable"`
|
||||
Value float64 `json:"value"`
|
||||
Value string `json:"value"`
|
||||
Unit string `json:"unit"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
@ -51,7 +52,7 @@ func Start() {
|
||||
v := variable_t {
|
||||
Label: label,
|
||||
Variable: "",
|
||||
Value: value,
|
||||
Value: strconv.FormatFloat(value, 'f', 4, 64)
|
||||
Unit: "ms",
|
||||
Status: status,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user