enhance coding style gofmt
This commit is contained in:
parent
b4eb7d3f92
commit
da3a590aab
|
@ -75,7 +75,7 @@ func (o *OpenTSDB) Write(bp client.BatchPoints) error {
|
||||||
Metric: fmt.Sprintf("%s%s", o.Prefix, pt.Measurement),
|
Metric: fmt.Sprintf("%s%s", o.Prefix, pt.Measurement),
|
||||||
Timestamp: timeNow.Unix(),
|
Timestamp: timeNow.Unix(),
|
||||||
}
|
}
|
||||||
metricValue, buildError := buildValue(bp, pt);
|
metricValue, buildError := buildValue(bp, pt)
|
||||||
if buildError != nil {
|
if buildError != nil {
|
||||||
fmt.Printf("OpenTSDB: %s\n", buildError.Error())
|
fmt.Printf("OpenTSDB: %s\n", buildError.Error())
|
||||||
continue
|
continue
|
||||||
|
@ -86,7 +86,7 @@ func (o *OpenTSDB) Write(bp client.BatchPoints) error {
|
||||||
metric.Tags = fmt.Sprint(strings.Join(tagsSlice, " "))
|
metric.Tags = fmt.Sprint(strings.Join(tagsSlice, " "))
|
||||||
|
|
||||||
messageLine := fmt.Sprintf("put %s %v %s %s\n", metric.Metric, metric.Timestamp, metric.Value, metric.Tags)
|
messageLine := fmt.Sprintf("put %s %v %s %s\n", metric.Metric, metric.Timestamp, metric.Value, metric.Tags)
|
||||||
if (o.Debug) {
|
if o.Debug {
|
||||||
fmt.Print(messageLine)
|
fmt.Print(messageLine)
|
||||||
}
|
}
|
||||||
_, err := connection.Write([]byte(messageLine))
|
_, err := connection.Write([]byte(messageLine))
|
||||||
|
|
Loading…
Reference in New Issue