func (cmd RepoPlugins) printErrors(repoError []string) { if len(repoError) > 0 { cmd.ui.Say(terminal.ColorizeBold(T("Logged errors:"), 31)) for _, e := range repoError { cmd.ui.Say(terminal.Colorize(e, 31)) } cmd.ui.Say("") } }
func (cmd RepoPlugins) printTable(repoPlugins map[string][]clipr.Plugin) error { for k, plugins := range repoPlugins { cmd.ui.Say(terminal.ColorizeBold(T("Repository: ")+k, 33)) table := cmd.ui.Table([]string{T("name"), T("version"), T("description")}) for _, p := range plugins { table.Add(p.Name, p.Version, p.Description) } err := table.Print() if err != nil { return err } cmd.ui.Say("") } return nil }