Documentation ¶
Index ¶
- func Convert(text string, opt ...Option) string
- type Border
- type BorderStyle
- type Corner
- type Frame
- type LineSplitter
- type NoneBorder
- type Option
- func DisableBorder() Option
- func WithBorder(leftTop, leftBottom, horizontal, vertical string) Option
- func WithCommonBorder(char string) Option
- func WithDotStyle() Option
- func WithDoubleLine() Option
- func WithFivePointedStarStyle() Option
- func WithLineStyle() Option
- func WithPlusStyle() Option
- func WithPrefix(prefix ...string) Option
- func WithStarStyle() Option
- type Row
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Border ¶
type Border struct {
// contains filtered or unexported fields
}
Border implements BorderStyle to receive a border style.
func (*Border) LineSplitter ¶
func (b *Border) LineSplitter() LineSplitter
LineSplitter describes a line splitter in horizontal and vertical.
type BorderStyle ¶
type BorderStyle interface { Corner() Corner LineSplitter() LineSplitter }
BorderStyle is an interface which describes a border style for log print.
type Corner ¶
type Corner struct {
// contains filtered or unexported fields
}
Corner describes the character for left side corner.
type Frame ¶
type Frame struct {
// contains filtered or unexported fields
}
Frame is a text render with options, such as render with border, or with prefix.
type LineSplitter ¶
type LineSplitter struct {
// contains filtered or unexported fields
}
LineSplitter describes the splitter in horizontal and vertica direction.
type NoneBorder ¶
type NoneBorder struct{}
NoneBorder implements BorderStyle represents borderless.
func (*NoneBorder) LineSplitter ¶
func (b *NoneBorder) LineSplitter() LineSplitter
LineSplitter describes a line splitter in horizontal and vertical.
type Option ¶
type Option func(f *Frame)
Option is an alias of the function with argument Frame .
func WithBorder ¶
WithBorder creates an Option from arguments.
func WithCommonBorder ¶
WithCommonBorder creates a Border Option which have the same character.
func WithDoubleLine ¶
func WithDoubleLine() Option
WithDoubleLine describes a double line style for border.
func WithFivePointedStarStyle ¶
func WithFivePointedStarStyle() Option
WithFivePointedStarStyle describes a file-pointed star style for border.