MCPcopy Index your code
hub / github.com/github/gh-aw / formatMaxSizeCell

Function formatMaxSizeCell

pkg/cli/audit_diff_render.go:788–800  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
788func 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
803func firewallStatusEmoji(status string) string {

Calls

no outgoing calls

Tested by

no test coverage detected