Documentation
¶
Index ¶
Constants ¶
const ( CompleteType = "complete" IncompleteType = "incomplete" )
Validation categories
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BarCharacter ¶ added in v0.0.2
type BarCharacter string
const ( Empty BarCharacter = " " Hash BarCharacter = "#" Asterisk BarCharacter = "*" Equal BarCharacter = "=" Plus BarCharacter = "+" Dash BarCharacter = "-" GreaterThan BarCharacter = ">" LessThan BarCharacter = "<" Colon BarCharacter = ":" Exclamation BarCharacter = "!" DollarSign BarCharacter = "$" AtSign BarCharacter = "@" Percent BarCharacter = "%" CircumFlex BarCharacter = "^" And BarCharacter = "&" )
type Option ¶ added in v0.0.2
Option pattern for configuration You can use:
WithWidth WithCompleteChar WithIncompleteChar WithMessage
func WithCompleteChar ¶ added in v0.0.2
func WithCompleteChar(c BarCharacter) Option
Complete character option
func WithIncompleteChar ¶ added in v0.0.2
func WithIncompleteChar(c BarCharacter) Option
Incomplete character option
func WithMessage ¶ added in v0.0.3
WithMessage sets the custom messages.
type Ravan ¶
type Ravan struct {
// contains filtered or unexported fields
}
Ravan struct
func (*Ravan) Draw ¶
Draw renders the progress bar on the terminal. progress should be a value between 0.0 and 1.0. When progress is 1.0 (100%), the bar is printed in green.
func (*Ravan) FailMsg ¶ added in v0.0.3
func (r *Ravan) FailMsg(err ...interface{})
FailMsg shows error (if provided) and/or custom failure message Usage: r.FailMsg() // Shows only custom message if set r.FailMsg(err) // Shows error + custom message r.FailMsg(err, customMessage) // Optional: Override default custom message
func (*Ravan) SuccessMsg ¶ added in v0.0.3
func (r *Ravan) SuccessMsg()
SuccessMsg prints a success message with successColor.
