From ca63c05b4e44c06aee7c4369a583c6fbb800ab49 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Fri, 18 Sep 2015 19:00:53 +0200 Subject: [PATCH] Fix creation of protobuf fields --- web/federate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/federate.go b/web/federate.go index 0a637e7c8..2f8b8aa93 100644 --- a/web/federate.go +++ b/web/federate.go @@ -95,8 +95,8 @@ func (h *Handler) federation(w http.ResponseWriter, req *http.Request) { } } - protMetric.TimestampMs = (*int64)(&sp.Timestamp) - protMetric.Untyped.Value = (*float64)(&sp.Value) + protMetric.TimestampMs = proto.Int64(int64(sp.Timestamp)) + protMetric.Untyped.Value = proto.Float64(float64(sp.Value)) if err := enc.Encode(protMetricFam); err != nil { http.Error(w, err.Error(), http.StatusInternalServerError)