Documentation
¶
Index ¶
- Constants
- Variables
- func BlockMessage(title string, content []string)
- func BoxError(_title string, _content string)
- func BoxInfo(_title string, _content string)
- func BoxMessage(_title string, _content string)
- func BoxSuccess(_title string, _content string)
- func BoxWarning(_title string, _content string)
- func BytesToString(b []byte) string
- func CallCost() *funcCaller
- func Check(err error)
- func CheckVar(name string, a any)
- func ColorTextLength(ctx string) int
- func ContentLeftAlign(ctx string, length int) string
- func DarwCallerTable(titleList []string, lengthList []int)
- func DrawBlockLine(length int, s1 string, s2 string, s3 string)
- func DrawBottom(lengthList []int)
- func DrawLine(__type__ int, lengthList []int)
- func DrawMiddle(lengthList []int)
- func DrawTableContent(content []string, length []int)
- func DrawTableLine(length []int, left string, seq string, split string, right string)
- func DrawTop(lengthList []int)
- func DrawTopContent(titleList []string, lengthList []int)
- func Error(_msg string)
- func ErrorMessage(error string, _msg string)
- func ExecutePath() string
- func Info(_msg string)
- func InfoMessage(info string, _msg string)
- func LogErorr(_msg string)
- func LogInfo(_msg string)
- func LogNote(_msg string)
- func LogSuccess(_msg string)
- func LogWarning(_msg string)
- func MaxLength(s []string) int
- func MiddleAlign(ctx string, length int) string
- func Must(err error)
- func Note(_msg string)
- func NoteMessage(_note string, _msg string)
- func PrintTimerLogs()
- func PrintVariables()
- func Recover()
- func Render(ctx string, rgb string) string
- func SingleLogger(src string)
- func StringLen(s string) int
- func StringToBytes(s string) []byte
- func Success(_msg string)
- func SuccessMessage(success string, _msg string)
- func TableMessage(_title []string, _content [][]string)
- func TimerStart() *timer
- func Timestamp() string
- func TitleMiddleAlign(ctx string, length int) string
- func UnixTime() int64
- func Warning(_msg string)
- func WarningMessage(warning string, _msg string)
- type LogOption
- type Variable
Constants ¶
View Source
const ( TopLeft = "╭" TopMiddle = "┬" TopRight = "╮" MiddleLeft = "├" MiddleCenter = "┼" MiddleRight = "┤" HLine = "─" VLine = "│" BottomLeft = "╰" BottomMiddle = "┴" BottomRight = "╯" )
Variables ¶
View Source
var ( CallerList = []*funcCaller{} MainStart = time.Now() )
View Source
var ( VariableList = []Variable{} PrintBuffer = strings.Builder{} TitleColor = "\033[1;36m" // TODO ColorList ColorList = []string{} TableMaxLength = 28 TopNotationList = []string{"╭", "─", "┬", "╮\n"} MiddleNotationList = []string{"├", "─", "┼", "┤\n"} BottomNotationList = []string{"╰", "─", "┴", "╯\n"} )
View Source
var (
StringBuilder = strings.Builder{}
)
Functions ¶
func BlockMessage ¶
func BoxMessage ¶
func BoxSuccess ¶
func BoxWarning ¶
func BytesToString ¶
BytesToString converts bytes to a string without memory allocation. NOTE: The given bytes MUST NOT be modified since they share the same backing array with the returned string.
func ColorTextLength ¶
func ContentLeftAlign ¶
func DarwCallerTable ¶
func DrawBottom ¶
func DrawBottom(lengthList []int)
func DrawMiddle ¶
func DrawMiddle(lengthList []int)
func DrawTableContent ¶
func DrawTableLine ¶
func DrawTopContent ¶
func ErrorMessage ¶
func ExecutePath ¶
func ExecutePath() string
func InfoMessage ¶
func LogSuccess ¶
func LogSuccess(_msg string)
func LogWarning ¶
func LogWarning(_msg string)
func MiddleAlign ¶
func NoteMessage ¶
func PrintTimerLogs ¶
func PrintTimerLogs()
func PrintVariables ¶
func PrintVariables()
func SingleLogger ¶
func SingleLogger(src string)
func StringToBytes ¶
StringToBytes converts a string to a byte slice without memory allocation. NOTE: The returned byte slice MUST NOT be modified since it shares the same backing array with the given string.
func SuccessMessage ¶
func TableMessage ¶
func TimerStart ¶
func TimerStart() *timer
func TitleMiddleAlign ¶
func WarningMessage ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.