func FormatGroupCoordinators(groupCoordinators []GroupCoordinator) string {
	buf := &bytes.Buffer{}
	table := tablewriter.NewWriter(buf)
	table.SetHeader(
		[]string{
			"Group",
			"Coordinator",
		},
	)
	table.SetAutoWrapText(false)
	table.SetColumnAlignment(
		[]int{
			tablewriter.ALIGN_LEFT,
			tablewriter.ALIGN_LEFT,
		},
	)
	table.SetBorders(
		tablewriter.Border{
			Left:   false,
			Top:    true,
			Right:  false,
			Bottom: true,
		},
	)
	for _, groupCoordinator := range groupCoordinators {
		table.Append(
			[]string{
				groupCoordinator.GroupID,
				fmt.Sprintf("%d", groupCoordinator.Coordinator),
			},
		)
	}
	table.Render()
	return string(bytes.TrimRight(buf.Bytes(), "\n"))
}
FormatGroupCoordinators generates a pretty table from the results of a call to GetGroups.
package groups
import (
	"bytes"
	"fmt"
	"sort"
	"strings"
	"time"
	"github.com/fatih/color"
	"github.com/olekukonko/tablewriter"
	"github.com/segmentio/topicctl/pkg/util"
)