(cmd *cobra.Command, rows []modelRow)
| 371 | } |
| 372 | |
| 373 | func (f *modelsListFlags) renderTable(cmd *cobra.Command, rows []modelRow) { |
| 374 | w := tabwriter.NewWriter(cmd.OutOrStdout(), 0, 2, 3, ' ', 0) |
| 375 | fmt.Fprintln(w, "PROVIDER\tMODEL\tDEFAULT") |
| 376 | for _, r := range rows { |
| 377 | def := "" |
| 378 | if r.Default { |
| 379 | def = "*" |
| 380 | } |
| 381 | fmt.Fprintf(w, "%s\t%s\t%s\n", r.Provider, r.Model, def) |
| 382 | } |
| 383 | w.Flush() |
| 384 | } |
| 385 | |
| 386 | func (f *modelsListFlags) renderJSON(cmd *cobra.Command, rows []modelRow) error { |
| 387 | enc := json.NewEncoder(cmd.OutOrStdout()) |
no test coverage detected