Index | Files

package box

import ""


Package Files

box.go types.go util.go

type Box

type Box struct {
    TopRight    string // TopRight corner used for Symbols
    TopLeft     string // TopLeft corner used for Symbols
    Vertical    string // Symbols used for Vertical Bars
    BottomRight string // BottomRight corner used for Symbols
    BottomLeft  string // BotromLeft corner used for Symbols
    Horizontal  string // Symbols used for Horizontal Bars
    Con         Config // Config for the Box struct

Box struct defines the Box to be made.

func New

func New(config Config) Box

New takes struct Config and returns the specified Box struct.

func (Box) Print

func (b Box) Print(title, lines string)

Print prints the box

func (Box) Println

func (b Box) Println(title, lines string)

Println adds a newline before and after the box

func (Box) String

func (b Box) String(title, lines string) string

String returns the string representation of Box.

type Config

type Config struct {
    Py           int    // Horizontal Padding
    Px           int    // Vertical Padding
    ContentAlign string // Content Alignment inside Box
    Type         string // Type of Box
    TitlePos     string // Title Position
    Color        string // Color of Box

Config is the configuration for the Box struct

v1.3.2 (latest)
Jul 26, 2020
5 packages (graph)
Last checked
2 months ago

Tools for package owners.