Documentation
¶
Overview ¶
Package icon provides a terminal output convenience helper for namespace type icons that can be configured via a CLI flag.
Index ¶
Constants ¶
const (
IconFlagName = "icon"
)
Names of the CLI flags defined and used in this package.
Variables ¶
var NamespaceTypeIcons = map[species.NamespaceType]string{ species.CLONE_NEWCGROUP: "🔧", species.CLONE_NEWIPC: "✉ ", species.CLONE_NEWNS: "📁", species.CLONE_NEWNET: "⇄ ", species.CLONE_NEWPID: "🏃", species.CLONE_NEWUSER: "👤", species.CLONE_NEWUTS: "💻", }
NamespaceTypeIcons maps individual Linux-kernel namespace types (species.NNamespaceTypeIcons) to Unicode characters to be used as icons.
Functions ¶
func IconSetupCLI ¶
IconSetupCLI is a plugin function that registers the CLI "--icon" flag.
func NamespaceIcon ¶
NamespaceIcon returns a function that returns an Unicode string which can be displayed as an "icon" for the specified namespace, when showing icons is enabled. If showing namespace icons is disabled, then an empty string is always returned instead. If necessary, the returned string contains padding.
Types ¶
This section is empty.