Enable gofmt code simplification (#4887)

This commit is contained in:
Trevor Pounds
2018-10-19 16:32:54 -04:00
committed by Daniel Nelson
parent 4a311830c6
commit ee056278f5
59 changed files with 599 additions and 599 deletions

View File

@@ -17,7 +17,7 @@ func TestJolokia2_makeReadRequests(t *testing.T) {
Mbean: "test:foo=bar",
},
expected: []ReadRequest{
ReadRequest{
{
Mbean: "test:foo=bar",
Attributes: []string{},
},
@@ -29,7 +29,7 @@ func TestJolokia2_makeReadRequests(t *testing.T) {
Paths: []string{"biz"},
},
expected: []ReadRequest{
ReadRequest{
{
Mbean: "test:foo=bar",
Attributes: []string{"biz"},
},
@@ -41,7 +41,7 @@ func TestJolokia2_makeReadRequests(t *testing.T) {
Paths: []string{"baz", "biz"},
},
expected: []ReadRequest{
ReadRequest{
{
Mbean: "test:foo=bar",
Attributes: []string{"baz", "biz"},
},
@@ -53,7 +53,7 @@ func TestJolokia2_makeReadRequests(t *testing.T) {
Paths: []string{"biz/baz"},
},
expected: []ReadRequest{
ReadRequest{
{
Mbean: "test:foo=bar",
Attributes: []string{"biz"},
Path: "baz",
@@ -66,7 +66,7 @@ func TestJolokia2_makeReadRequests(t *testing.T) {
Paths: []string{"biz/baz/fiz/faz"},
},
expected: []ReadRequest{
ReadRequest{
{
Mbean: "test:foo=bar",
Attributes: []string{"biz"},
Path: "baz/fiz/faz",
@@ -79,12 +79,12 @@ func TestJolokia2_makeReadRequests(t *testing.T) {
Paths: []string{"baz/biz", "faz/fiz"},
},
expected: []ReadRequest{
ReadRequest{
{
Mbean: "test:foo=bar",
Attributes: []string{"baz"},
Path: "biz",
},
ReadRequest{
{
Mbean: "test:foo=bar",
Attributes: []string{"faz"},
Path: "fiz",

View File

@@ -748,7 +748,7 @@ func setupPlugin(t *testing.T, conf string) telegraf.Input {
t.Fatalf("Unable to parse config! %v", err)
}
for name, _ := range table.Fields {
for name := range table.Fields {
object := table.Fields[name]
switch name {
case "jolokia2_agent":