1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-17 04:50:02 +02:00

src/api/log_params.go: Don't need a ToSlice() function as LogParams is already a slice.

This commit is contained in:
Henrik Hautakoski 2022-10-21 15:01:38 +02:00
parent 3ab2db7cb3
commit 8d2c1c8fa3
No known key found for this signature in database
GPG key ID: 608414D93E862CCD
2 changed files with 1 additions and 5 deletions

View file

@ -6,7 +6,3 @@ type LogParams []interface{}
func (p *LogParams) Add(field string, value interface{}) {
*p = append(*p, field, value)
}
func (p LogParams) ToSlice() []interface{} {
return []interface{}(p)
}

View file

@ -30,5 +30,5 @@ func TestLogParams(t *testing.T) {
},
})
assert.ElementsMatch(t, expected, p.ToSlice())
assert.ElementsMatch(t, expected, p)
}