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