You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
447 B
Go
21 lines
447 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/olekukonko/tablewriter"
|
|
)
|
|
|
|
func main() {
|
|
data := [][]string{
|
|
[]string{"Alfred", "15", "10/20", "(10.32, 56.21, 30.25)"},
|
|
[]string{"Beelzebub", "30", "30/50", "(11.32, 57.21, 31.25)"},
|
|
[]string{"Pokey", "19", "20/20", "(12.32, 54.21, 33.25)"},
|
|
}
|
|
|
|
table := tablewriter.NewWriter(os.Stdout)
|
|
table.SetHeader([]string{"Name", "Speed", "Power", "Location"})
|
|
table.AppendBulk(data)
|
|
table.Render()
|
|
}
|