format

package
v0.0.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TopLeft   = "╭"
	TopMiddle = "┬"
	TopRight  = "╮"

	MiddleLeft   = "├"
	MiddleCenter = "┼"
	MiddleRight  = "┤"

	HLine = "─"
	VLine = "│"

	BottomLeft   = "╰"
	BottomMiddle = "┴"
	BottomRight  = "╯"
)

Variables

This section is empty.

Functions

func BlockMessage

func BlockMessage(title string, content []string)

func BoxError

func BoxError(_title string, _content string)

func BoxExample

func BoxExample()

func BoxInfo

func BoxInfo(_title string, _content string)

func BoxMessage

func BoxMessage(_title string, _content string, l1 int, l2 int)

func BoxNote

func BoxNote(_title string, _content string)

func BoxSuccess

func BoxSuccess(_title string, _content string)

func BoxWarning

func BoxWarning(_title string, _content string)

func Check

func Check(err error)

func ColorTextLength

func ColorTextLength(ctx string) int

func ContentLeftAlign

func ContentLeftAlign(ctx string, length int) string

func DrawBlockLine

func DrawBlockLine(length int, s1 string, s2 string, s3 string)

func DrawTableContent

func DrawTableContent(content []string, length []int)

func DrawTableLine

func DrawTableLine(length []int, left string, seq string, split string, right string)

func Error

func Error(_msg string)

func ErrorMessage

func ErrorMessage(error string, _msg string)

func Example

func Example()

func Info

func Info(_msg string)

func InfoMessage

func InfoMessage(info string, _msg string)

func LogErorr

func LogErorr(_msg string)

func LogExample

func LogExample()

func LogInfo

func LogInfo(_msg string)

func LogNote

func LogNote(_msg string)

func LogSuccess

func LogSuccess(_msg string)

func LogWarning

func LogWarning(_msg string)

func MaxLength

func MaxLength(s []string) int

func Must

func Must(err error)

func Note

func Note(_msg string)

func NoteMessage

func NoteMessage(_note string, _msg string)

func Recover

func Recover()

func SingleLogger

func SingleLogger(src string)

func StringLen

func StringLen(s string) int

StringLen return the width of string abcd 4 你好 4

func Success

func Success(_msg string)

func SuccessMessage

func SuccessMessage(success string, _msg string)

func TableMessage

func TableMessage(_title []string, _content [][]string)

func TimerStart

func TimerStart() *timer

func Timestamp

func Timestamp() string

func TitleMiddleAlign

func TitleMiddleAlign(ctx string, length int) string

func UnixTime

func UnixTime() int64

func Warning

func Warning(_msg string)

func WarningMessage

func WarningMessage(warning string, _msg string)

Types

type LogOption

type LogOption struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL