box-cli-maker – github.com/Delta456/box-cli-maker Index | Files

package box

import "github.com/Delta456/box-cli-maker"

Index

Types

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

Source Files

box.go types.go util.go

Version
v1.3.2 (latest)
Published
Jul 26, 2020
Platform
linux/amd64
Imports
5 packages
Last checked
18 hours ago

Tools for package owners.