go fmt run over jolokia.go

This commit is contained in:
saiello 2015-10-29 14:48:39 +01:00 committed by Cameron Sparr
parent 40d8aeecb0
commit 62270a3697
1 changed files with 71 additions and 78 deletions

View File

@ -13,7 +13,6 @@ import (
"github.com/influxdb/telegraf/plugins"
)
type Server struct {
Name string
Host string
@ -28,14 +27,12 @@ type Metric struct {
}
type Jolokia struct {
Context string
Servers []Server
Metrics []Metric
Tags map[string]string
}
func (j *Jolokia) SampleConfig() string {
return `[jolokia]
context = "/jolokia/read"
@ -70,8 +67,6 @@ func (j *Jolokia) Description() string {
return "Read JMX metrics through Jolokia"
}
func getAttr(requestUrl *url.URL) (map[string]interface{}, error) {
//make request
resp, err := http.Get(requestUrl.String())
@ -144,7 +139,6 @@ func (m *Metric) filterFields(fields map[string]interface{}) map[string]interfac
return fields
}
func (j *Jolokia) Gather(acc plugins.Accumulator) error {
context := j.Context //"/jolokia/read"
@ -156,7 +150,6 @@ func (j *Jolokia) Gather(acc plugins.Accumulator) error {
tags = map[string]string{}
}
for _, server := range servers {
for _, metric := range metrics {