Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Example ¶
package main import ( "github.com/chiyouhen/tablewriter" "os" ) func main() { type User struct { Name string Age int Speed float64 } users := []User{ { "John", 15, 14.3, }, { "Mike", 14, 11.5, }, } wr := tablewriter.NewWriter(os.Stdout, []string{"Name", "Age", "Speed"}) for _, u := range users { wr.Write(u) } wr.Flush() // output // Name Age Speed // John 15 14.300000 // Mike 14 11.500000 }
Output:
Click to show internal directories.
Click to hide internal directories.