newFormat returns a Format for rendering using a configContext.
(source string, quiet bool)
| 36 | |
| 37 | // newFormat returns a Format for rendering using a configContext. |
| 38 | func newFormat(source string, quiet bool) formatter.Format { |
| 39 | switch source { |
| 40 | case formatter.PrettyFormatKey: |
| 41 | return configInspectPrettyTemplate |
| 42 | case formatter.TableFormatKey: |
| 43 | if quiet { |
| 44 | return formatter.DefaultQuietFormat |
| 45 | } |
| 46 | return defaultConfigTableFormat |
| 47 | } |
| 48 | return formatter.Format(source) |
| 49 | } |
| 50 | |
| 51 | // formatWrite writes the context |
| 52 | func formatWrite(fmtCtx formatter.Context, configs client.ConfigListResult) error { |
no outgoing calls
searching dependent graphs…