SaveData process and stores data related to the CLI usage.
(ctx context.Context, cmd *cobra.Command)
| 131 | |
| 132 | // SaveData process and stores data related to the CLI usage. |
| 133 | func (*cliTask) SaveData(ctx context.Context, cmd *cobra.Command) { |
| 134 | logger := log.FromContext(ctx) |
| 135 | |
| 136 | st, err := store.New() |
| 137 | if err != nil { |
| 138 | logger.WithError(err).Debug("Failed to open telemetry database") |
| 139 | return |
| 140 | } |
| 141 | |
| 142 | if err := st.StoreCommand(cmd); err != nil { |
| 143 | logger.WithError(err).Debug("Failed to store command usage data") |
| 144 | return |
| 145 | } |
| 146 | } |
nothing calls this directly
no test coverage detected