Skip to content

psotou/linedraw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆┆

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages