newFormat returns a Format for rendering using a pluginContext.
(source string, quiet bool)
| 23 | |
| 24 | // newFormat returns a Format for rendering using a pluginContext. |
| 25 | func newFormat(source string, quiet bool) formatter.Format { |
| 26 | switch source { |
| 27 | case formatter.TableFormatKey: |
| 28 | if quiet { |
| 29 | return formatter.DefaultQuietFormat |
| 30 | } |
| 31 | return defaultPluginTableFormat |
| 32 | case formatter.RawFormatKey: |
| 33 | if quiet { |
| 34 | return `plugin_id: {{.ID}}` |
| 35 | } |
| 36 | return rawFormat |
| 37 | } |
| 38 | return formatter.Format(source) |
| 39 | } |
| 40 | |
| 41 | // formatWrite writes the context |
| 42 | func formatWrite(fmtCtx formatter.Context, plugins client.PluginListResult) error { |
no outgoing calls
searching dependent graphs…