(num int)
| 62 | } |
| 63 | |
| 64 | func NumToLabelText(num int) string { |
| 65 | if num > 59 || num < 0 { |
| 66 | log.Printf("NumToLabelText: num must be between 0 and 59") |
| 67 | return "00" |
| 68 | } |
| 69 | |
| 70 | return fmt.Sprintf("%02d", num) |
| 71 | } |
| 72 | |
| 73 | // FormatDuration converts a time.Duration to a string in the format "HH:MM:SS" or "MM:SS". |
| 74 | // Hours are only included if the duration is 1 hour or longer. |
no outgoing calls
no test coverage detected