Documentation
ΒΆ
Index ΒΆ
Constants ΒΆ
View Source
const SpinnerCharacter = 9
Variables ΒΆ
View Source
var ( // LowBullet is a bullet-point prefix for Low-fi mode LowBullet = "* " // LowIndent is an indented bullet-point prefix for Low-fi mode LowIndent = " - " // LowWarning is a warning prefix for Low-fi mode LowWarning = "! " // LowError is an error prefix for Low-fi mode LowError = "X " // Indented is how far to indent unstyled text Indented = " " )
View Source
var Config = map[Enum]Options{ Celebration: {Prefix: "π "}, Check: {Prefix: "β "}, Command: {Prefix: " βͺ ", LowPrefix: LowIndent}, Confused: {Prefix: "π "}, Deleted: {Prefix: "π "}, Documentation: {Prefix: "π "}, Empty: {Prefix: "", LowPrefix: ""}, Happy: {Prefix: "π "}, Issue: {Prefix: " βͺ ", LowPrefix: LowIndent}, Issues: {Prefix: "πΏ "}, Launch: {Prefix: "π "}, LogEntry: {Prefix: " "}, New: {Prefix: "π "}, Notice: {Prefix: "π "}, Option: {Prefix: " βͺ ", LowPrefix: LowIndent}, Pause: {Prefix: "βΈοΈ "}, Provisioning: {Prefix: "π± "}, Ready: {Prefix: "π "}, Restarting: {Prefix: "π "}, Running: {Prefix: "π "}, Sparkle: {Prefix: "β¨ "}, Stopped: {Prefix: "π "}, Stopping: {Prefix: "β "}, Success: {Prefix: "β "}, ThumbsDown: {Prefix: "π "}, ThumbsUp: {Prefix: "π "}, Unpause: {Prefix: "β―οΈ "}, URL: {Prefix: "π ", LowPrefix: LowIndent}, Usage: {Prefix: "π‘ "}, Waiting: {Prefix: "β "}, Unsupported: {Prefix: "π‘ "}, Workaround: {Prefix: "π ", LowPrefix: LowIndent}, Conflict: {Prefix: "π’ ", LowPrefix: LowWarning}, Failure: {Prefix: "β ", LowPrefix: LowError}, Fatal: {Prefix: "π£ ", LowPrefix: LowError}, Warning: {Prefix: "β ", LowPrefix: LowWarning}, KnownIssue: {Prefix: "π§― ", LowPrefix: LowError}, UnmetRequirement: {Prefix: "β ", LowPrefix: LowError}, NotAllowed: {Prefix: "π« ", LowPrefix: LowError}, Embarrassed: {Prefix: "π€¦ ", LowPrefix: LowWarning}, Sad: {Prefix: "πΏ "}, Shrug: {Prefix: "π€· "}, Improvement: {Prefix: "π¨ ", LowPrefix: LowWarning}, SeeNoEvil: {Prefix: "π ", LowPrefix: LowError}, AddonDisable: {Prefix: "π "}, AddonEnable: {Prefix: "π "}, Caching: {Prefix: "π€Ή "}, Celebrate: {Prefix: "π "}, Connectivity: {Prefix: "πΆ "}, Containerd: {Prefix: "π¦ "}, ContainerRuntime: {Prefix: "π "}, Copying: {Prefix: "β¨ "}, CRIO: {Prefix: "π "}, DeletingHost: {Prefix: "π₯ "}, Docker: {Prefix: "π³ ", OmitNewline: true, Spinner: true}, DryRun: {Prefix: "π΅ "}, Enabling: {Prefix: "π "}, FileDownload: {Prefix: "πΎ "}, Fileserver: {Prefix: "π ", OmitNewline: true}, HealthCheck: {Prefix: "π "}, Internet: {Prefix: "π "}, ISODownload: {Prefix: "πΏ "}, Kubectl: {Prefix: "π "}, Meh: {Prefix: "π ", LowPrefix: LowWarning}, Mounting: {Prefix: "π "}, MountOptions: {Prefix: "πΎ "}, Permissions: {Prefix: "π "}, Provisioner: {Prefix: "βΉοΈ "}, Pulling: {Prefix: "π "}, Resetting: {Prefix: "π "}, Shutdown: {Prefix: "π "}, StartingNone: {Prefix: "π€Ή "}, StartingVM: {Prefix: "π₯ "}, SubStep: {Prefix: " βͺ ", LowPrefix: LowIndent, OmitNewline: true, Spinner: true}, Tip: {Prefix: "π‘ "}, Unmount: {Prefix: "π₯ "}, VerifyingNoLine: {Prefix: "π€ ", OmitNewline: true}, Verifying: {Prefix: "π€ "}, CNI: {Prefix: "π "}, }
Config is a map of style name to style struct For consistency, ensure that emojis added render with the same width across platforms.
Functions ΒΆ
Types ΒΆ
type Enum ΒΆ
type Enum int
Enum is an enumeration of Style
const ( None Enum = iota AddonDisable AddonEnable Caching Celebrate Celebration Check Command Conflict Confused Connectivity Containerd ContainerRuntime Copying CRIO Deleted DeletingHost Docker Documentation DryRun Embarrassed Empty Enabling Failure Fatal FileDownload Fileserver Happy HealthCheck Improvement Internet ISODownload Issue Issues Kubectl KnownIssue Launch LogEntry Meh Mounting MountOptions New Notice NotAllowed Option Pause Permissions Provisioner Provisioning Pulling Ready Resetting Restarting Running Sad SeeNoEvil Shrug Shutdown Sparkle StartingNone StartingVM Stopped Stopping SubStep Success ThumbsDown ThumbsUp Tip Unmount Unpause UnmetRequirement Unsupported URL Usage Verifying VerifyingNoLine Waiting WaitingPods Warning Workaround CNI )
All the Style constants available
type Options ΒΆ
type Options struct { // Prefix is a string to place in the beginning of a message Prefix string // LowPrefix is the 7-bit compatible prefix we fallback to for less-awesome terminals LowPrefix string // OmitNewline omits a newline at the end of a message. OmitNewline bool // Spinner is a character to place at ending of message Spinner bool }
Options describes how to stylize a message.
Click to show internal directories.
Click to hide internal directories.