(cmd *cobra.Command, items []T)
| 168 | } |
| 169 | |
| 170 | func writeJSONLines[T any](cmd *cobra.Command, items []T) error { |
| 171 | for _, item := range items { |
| 172 | if err := writeJSONLine(cmd, item); err != nil { |
| 173 | return err |
| 174 | } |
| 175 | } |
| 176 | return nil |
| 177 | } |
| 178 | |
| 179 | func writeJSON(cmd *cobra.Command, value any) error { |
| 180 | encoder := json.NewEncoder(cmd.OutOrStdout()) |
no test coverage detected