-
Notifications
You must be signed in to change notification settings - Fork 0
Styled output
Brandon Jordan edited this page Mar 12, 2023
·
5 revisions
ttuy.Style("Text", ttuy.Bold, ttuy.Green) // returns string

// Success
ttuy.Success("Done!")
var success = "Done!"
ttuy.Successf("%s", success)// Info
ttuy.Info("FYI!")
var info = "FYI!"
ttuy.Infof("%s", info)// Warning
ttuy.Warn("Unable to do something!")
var warning = "Unable to do something!"
ttuy.Warnf("%s", warning)// Error
ttuy.Fail("Unable to do something!")
var _, err = os.ReadDir("doesntExist")
ttuy.FailErr("Label", err)
var message = "Unable to do something!"
ttuy.Failf("%s", message)Banner(message) returns a banner around message made of # signs.
Banner("Title")
BigBanner(message) returns a box around message made of # signs.
BigBanner("Title")
Both banners are the width of the terminal window.