MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / GetIconLabel

Function GetIconLabel

internal/ui/utils/formatting.go:126–131  ·  view source on GitHub ↗

GetIconLabel returns a label with or without an icon prefix based on showIcons flag. When showIcons is true, returns "icon label" (with a space separator). When showIcons is false, returns just the label.

(label string, icon string, showIcons bool)

Source from the content-addressed store, hash-verified

124// When showIcons is true, returns "icon label" (with a space separator).
125// When showIcons is false, returns just the label.
126func GetIconLabel(label string, icon string, showIcons bool) string {
127 if showIcons {
128 return icon + " " + label
129 }
130 return label
131}
132
133// GetStatusEmoji returns the appropriate status emoji or text based on showIcons flag.
134func GetStatusEmoji(status string, showIcons bool) string {

Callers 14

UpdateMethod · 0.92
ShowVMContextMenuMethod · 0.92
UpdateMethod · 0.92
loadSnapshotsMethod · 0.92
displaySnapshotsMethod · 0.92
deleteSnapshotMethod · 0.92
rollbackSnapshotMethod · 0.92
ShowCreateFormMethod · 0.92
loadBackupsMethod · 0.92
displayBackupsMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected