Commit 86bc462b by Marcus Efraimsson

remove unnecessary conversion (metalinter)

parent 3350a347
...@@ -10,11 +10,11 @@ func TestFormatShort(t *testing.T) { ...@@ -10,11 +10,11 @@ func TestFormatShort(t *testing.T) {
interval time.Duration interval time.Duration
expected string expected string
}{ }{
{interval: time.Duration(time.Hour), expected: "1h"}, {interval: time.Hour, expected: "1h"},
{interval: time.Duration(time.Hour + time.Minute), expected: "1h1m"}, {interval: time.Hour + time.Minute, expected: "1h1m"},
{interval: time.Duration((time.Hour * 10) + time.Minute), expected: "10h1m"}, {interval: (time.Hour * 10) + time.Minute, expected: "10h1m"},
{interval: time.Duration((time.Hour * 10) + (time.Minute * 10) + time.Second), expected: "10h10m1s"}, {interval: (time.Hour * 10) + (time.Minute * 10) + time.Second, expected: "10h10m1s"},
{interval: time.Duration(time.Minute * 10), expected: "10m"}, {interval: time.Minute * 10, expected: "10m"},
} }
for _, tc := range tcs { for _, tc := range tcs {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment