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

@@ -278,7 +278,7 @@ func flatten(data interface{}) []*metric {
switch val := data.(type) {
case float64:
metrics = []*metric{&metric{make([]string, 0, 1), val}}
metrics = []*metric{{make([]string, 0, 1), val}}
case map[string]interface{}:
metrics = make([]*metric, 0, len(val))
for k, v := range val {

View File

@@ -81,7 +81,7 @@ func TestGather(t *testing.T) {
}()
findSockets = func(c *Ceph) ([]*socket, error) {
return []*socket{&socket{"osd.1", typeOsd, ""}}, nil
return []*socket{{"osd.1", typeOsd, ""}}, nil
}
perfDump = func(binary string, s *socket) (string, error) {
@@ -190,17 +190,17 @@ type SockTest struct {
}
var sockTestParams = []*SockTest{
&SockTest{
{
osds: 2,
mons: 2,
},
&SockTest{
{
mons: 1,
},
&SockTest{
{
osds: 1,
},
&SockTest{},
{},
}
var monPerfDump = `