(r *runtimev1.Resource)
| 179 | } |
| 180 | |
| 181 | func newResourceTableRow(r *runtimev1.Resource) *resourceTableRow { |
| 182 | truncErr := r.Meta.ReconcileError |
| 183 | if len(truncErr) > 80 { |
| 184 | truncErr = truncErr[:80] + "..." |
| 185 | } |
| 186 | |
| 187 | truncWarn := strings.Join(r.Meta.ReconcileWarnings, "; ") |
| 188 | if len(truncWarn) > 80 { |
| 189 | truncWarn = truncWarn[:80] + "..." |
| 190 | } |
| 191 | |
| 192 | return &resourceTableRow{ |
| 193 | Type: runtime.PrettifyResourceKind(r.Meta.Name.Kind), |
| 194 | Name: r.Meta.Name.Name, |
| 195 | Status: runtime.PrettifyReconcileStatus(r.Meta.ReconcileStatus), |
| 196 | Error: truncErr, |
| 197 | Warning: truncWarn, |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | type parseErrorTableRow struct { |
| 202 | Path string `header:"path"` |
no test coverage detected