icon

package
v0.42.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package icon provides a terminal output convenience helper for namespace type icons that can be configured via a CLI flag.

Index

Constants

View Source
const (
	IconFlagName = "icon"
)

Names of the CLI flags defined and used in this package.

Variables

NamespaceTypeIcons maps individual Linux-kernel namespace types (species.NNamespaceTypeIcons) to Unicode characters to be used as icons.

Functions

func IconSetupCLI

func IconSetupCLI(rootCmd *cobra.Command)

IconSetupCLI is a plugin function that registers the CLI "--icon" flag.

func NamespaceIcon

func NamespaceIcon(cmd *cobra.Command) func(model.Namespace) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL