Documentation
¶
Index ¶
- Variables
- func Ascii(width uint, code string) (out string, err error)
- func DrawBox(width uint, text string) (out [][]rune, height uint)
- func DrawFor(width uint, text string) (out [][]rune, height uint)
- func DrawFunc(width uint, text string) (out [][]rune, height uint)
- func DrawFuncInternal(width uint, text string) (out [][]rune, height uint)
- func DrawIf(width uint, text string) (out [][]rune, height uint)
- func DrawSwitch(width uint, text string) (out [][]rune, height uint)
- func DrawText(width uint, text string) (out [][]rune, height uint)
- func ErrToOut(width uint, err error) (out string)
- func Graph(width uint, code string) (out string, err error)
- func NodeToString(node ast.Node) string
- type Visitor
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RuneFunc = '@' RuneFuncInternal = '\\' RuneBox = ':' RuneFor = '*' RuneIf = '#' RuneSwitch = '$' RuneDown = 'V' RuneUp = '^' RuneVertical = '|' )
Functions ¶
func DrawBox ¶
Example ¶
var width uint = 10 out, height := DrawBox(width, "Long lorem porem text") err := draw(width, height, out) if err != nil { fmt.Fprintf(os.Stdout, "%v", err) return }
Output: |::::::::::| |: LONG L :| |: OREM P :| |: OREM T :| |: EXT :| |::::::::::|
func DrawIf ¶
Example ¶
var width uint = 10 out, height := DrawIf(width, "Long lorem porem text") err := draw(width, height, out) if err != nil { fmt.Fprintf(os.Stdout, "%v", err) return }
Output: |IF #######| |# LONG L #| |# OREM P #| |# OREM T #| |# EXT #| |##########|
func DrawText ¶
Example ¶
var width uint = 10 out, height := DrawText(width, "Long lorem porem text") err := draw(width, height, out) if err != nil { fmt.Fprintf(os.Stdout, "%v", err) return }
Output: |LONG LOREM| | POREM TEX| |T |
func NodeToString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.