Documentation ¶
Overview ¶
Package table produces a string that represents slice of structs data in a text table
Example ¶
package main import ( "github.com/404tk/table" ) type House struct { Name string Sigil string Motto string } func main() { hs := []House{ {"Stark", "direwolf", "Winter is coming"}, {"Targaryen", "dragon", "Fire and Blood"}, {"Lannister", "lion", "Hear Me Roar"}, } // Output to stdout table.Output(hs) // Or just return table string and then do something s := table.Table(hs) _ = s // Output to file table.FileOutput("test.log", hs) }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileOutput ¶
func FileOutput(filename string, slice interface{})
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.