Skip to content

Commit 0b511d7

Browse files
committed
refactor(health): remove unused duration formatting function
- Remove formatDurationSeconds function that was not being utilized - Remove unused fmt import from clients.go - Simplify codebase by eliminating dead code
1 parent 5d01d4a commit 0b511d7

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

health/clients.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package health
22

33
import (
4-
"fmt"
54
"strconv"
65
"time"
76
)
@@ -64,20 +63,3 @@ func getActiveClients(portFilter string) []ClientInfo {
6463

6564
return result
6665
}
67-
68-
func formatDurationSeconds(d time.Duration) string {
69-
d = d.Round(time.Second)
70-
h := d / time.Hour
71-
d -= h * time.Hour
72-
m := d / time.Minute
73-
d -= m * time.Minute
74-
s := d / time.Second
75-
76-
if h > 0 {
77-
return fmt.Sprintf("%dh%dm%ds", h, m, s)
78-
}
79-
if m > 0 {
80-
return fmt.Sprintf("%dm%ds", m, s)
81-
}
82-
return fmt.Sprintf("%ds", s)
83-
}

0 commit comments

Comments
 (0)