Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 1.29 KB

README.md

File metadata and controls

49 lines (38 loc) · 1.29 KB

Usage

Go

Import the package in order to use the line drawing of your choice:

import (
    "github.com/psotou/linedraw"
)

And then use one of the four line drawing available by calling the type of line as follows:

// we need to pass the length of the desired line to the factory function
line := NewLine(12)
line.Horizontal.Bold()
fmt.Println("hola")
line.Horizontal.Light()

This will output the following:

━━━━━━━━━━━━━━━━━━━━━━━━━
hola
─────────────────────────

The other options available are Vertical, HorizontalDotted and VerticalDotted, which will produce the following output:

┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃
hola
│││││││││││││││││││││││││
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
hola
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
┇┇┇┇┇┇┇┇┇┇┇┇┇┇┇┇┇┇┇┇┇┇┇┇┇
hola
┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆