Documentation ΒΆ
Index ΒΆ
Constants ΒΆ
View Source
const SpinnerCharacter = 9
SpinnerCharacter is which of the spinner.CharSets to use
Variables ΒΆ
View Source
var ( // LowBullet is a bullet-point prefix for Low-fi mode LowBullet = "* " // LowIndent is an indented prefix for Low-fi mode LowIndent = " " // LowIndentBullet is an indented bullet-point prefix for Low-fi mode LowIndentBullet = " - " // 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: LowIndentBullet}, Confused: {Prefix: "π "}, Deleted: {Prefix: "π "}, Documentation: {Prefix: "π "}, Empty: {Prefix: "", LowPrefix: ""}, Happy: {Prefix: "π "}, Issue: {Prefix: " βͺ ", LowPrefix: LowIndentBullet}, Indent: {Prefix: " ", LowPrefix: LowIndent}, Issues: {Prefix: "πΏ "}, Launch: {Prefix: "π "}, LogEntry: {Prefix: " "}, New: {Prefix: "π "}, Notice: {Prefix: "π "}, Option: {Prefix: " βͺ ", LowPrefix: LowIndentBullet}, 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: "β "}, WaitingWithSpinner: {Prefix: "β ", OmitNewline: true, Spinner: true}, 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: "π€Ή "}, StartingSSH: {Prefix: "π "}, StartingVM: {Prefix: "π₯ ", OmitNewline: true, Spinner: true}, SubStep: {Prefix: " βͺ ", LowPrefix: LowIndentBullet, OmitNewline: true, Spinner: true}, Tip: {Prefix: "π‘ "}, Unmount: {Prefix: "π₯ "}, VerifyingNoLine: {Prefix: "π€ ", OmitNewline: true}, Verifying: {Prefix: "π€ "}, CNI: {Prefix: "π "}, Toolkit: {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 Indent 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 StartingSSH StartingVM Stopped Stopping SubStep Success ThumbsDown ThumbsUp Tip Unmount Unpause UnmetRequirement Unsupported URL Usage Verifying VerifyingNoLine Waiting WaitingWithSpinner WaitingPods Warning Workaround CNI Toolkit )
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.