formatMaxSizeCell formats a "run1 / run2" max-size pair for display in a table cell. Returns "—" when both values are zero, and omits the individual value if it is zero.
(run1Size, run2Size int)
| 786 | // formatMaxSizeCell formats a "run1 / run2" max-size pair for display in a table cell. |
| 787 | // Returns "—" when both values are zero, and omits the individual value if it is zero. |
| 788 | func formatMaxSizeCell(run1Size, run2Size int) string { |
| 789 | if run1Size == 0 && run2Size == 0 { |
| 790 | return "—" |
| 791 | } |
| 792 | v1, v2 := strconv.Itoa(run1Size), strconv.Itoa(run2Size) |
| 793 | if run1Size == 0 { |
| 794 | v1 = "—" |
| 795 | } |
| 796 | if run2Size == 0 { |
| 797 | v2 = "—" |
| 798 | } |
| 799 | return v1 + " / " + v2 |
| 800 | } |
| 801 | |
| 802 | // firewallStatusEmoji returns the status emoji for a domain status |
| 803 | func firewallStatusEmoji(status string) string { |
no outgoing calls
no test coverage detected