-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update models.go #1494
Update models.go #1494
Conversation
Error "json: invalid use of ,string struct tag, trying to unmarshal unquoted value into int64" #1386
@@ -67,8 +67,8 @@ type ItemTag struct { | |||
type Trend []TrendPoint | |||
|
|||
type TrendPoint struct { | |||
ItemID string `json:"itemid,omitempty"` | |||
Clock int64 `json:"clock,omitempty,string"` | |||
ItemID int64 `json:"itemid,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg/datasource/response_handler.go:24:24: cannot use point.ItemID (type int64) as type string in map index
pkg/datasource/response_handler.go:25:15: cannot use point.ItemID (type int64) as type string in map index
pkg/datasource/response_handler.go:26:13: cannot use point.ItemID (type int64) as type string in map index
pkg/datasource/response_handler.go:28:27: cannot use point.ItemID (type int64) as type string in map index
But this is a good idea, I'll take a look closer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg/datasource/response_handler.go:24,25,26
pointItem := itemsMap[strconv.FormatInt(point.ItemID,10)]
if seriesMap[strconv.FormatInt(point.ItemID,10)] == nil {
seriesMap[strconv.FormatInt(point.ItemID,10)] = timeseries.NewTimeSeriesData()
pkg/datasource/response_handler.go:28
pointSeries := seriesMap[strconv.FormatInt(point.ItemID,10)]
Are you able to replicate the original bug? |
I am not an author but I have an original bug with grafana 9.2.0 zabbix 6.2.0 and elasticsearch 7.13.2. |
|
Error "json: invalid use of ,string struct tag, trying to unmarshal unquoted value into int64"
#1386