Documentation ¶
Overview ¶
Package protip provides methods for displaying usage tips
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ColorTag = "{#75}"
ColorTag is default panel color tag
View Source
var Options = panel.Options{panel.TOP_LINE, panel.BOTTOM_LINE}
Options contains default panel options
View Source
var Probability = 0.25
Probability is showing probability coefficient (0 ← less | more → 1)
Functions ¶
func Add ¶
func Add(tips ...*Tip)
Add adds one or more tips to collection
Example ¶
// Add simple tip Add(&Tip{ Title: "Tip #1", Message: `Tip message`, }) // Add tip with custom weight (≠ 0.5) Add(&Tip{ Title: "Tip #2", Message: `Tip message`, Weight: 0.1, }) // Add tip with custom weight (≠ 0.5) and color Add(&Tip{ Title: "Tip #3", Message: `Tip message`, Weight: 0.8, ColorTag: "{b}", })
Output:
Types ¶
Click to show internal directories.
Click to hide internal directories.