From 8f182d2f02c8d21ae74eaa420ce207788b6e0dcb Mon Sep 17 00:00:00 2001 From: beorn7 Date: Thu, 17 Sep 2015 14:05:56 +0200 Subject: [PATCH] Move from client_golang/text to common/expfmt --- collector/textfile.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/collector/textfile.go b/collector/textfile.go index e032bed5..97bd9546 100644 --- a/collector/textfile.go +++ b/collector/textfile.go @@ -12,13 +12,12 @@ import ( "strings" "time" - dto "github.com/prometheus/client_model/go" - "github.com/golang/protobuf/proto" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/common/expfmt" "github.com/prometheus/log" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/text" + dto "github.com/prometheus/client_model/go" ) var ( @@ -78,7 +77,8 @@ func (c *textFileCollector) parseTextFiles() []*dto.MetricFamily { error = 1.0 continue } - parsedFamilies, err := (&text.Parser{}).TextToMetricFamilies(file) + var parser expfmt.TextParser + parsedFamilies, err := parser.TextToMetricFamilies(file) if err != nil { log.Errorf("Error parsing %s: %v", path, err) error = 1.0