appendError appends errs onto r.Error. We only have one error, so multiple errors need to be squashed in there.
(es ...string)
| 110 | // appendError appends errs onto r.Error. |
| 111 | // We only have one error, so multiple errors need to be squashed in there. |
| 112 | func (r *WorkspaceProxyReport) appendError(es ...string) { |
| 113 | if len(es) == 0 { |
| 114 | return |
| 115 | } |
| 116 | if r.Error != nil { |
| 117 | es = append([]string{*r.Error}, es...) |
| 118 | } |
| 119 | r.Error = ptr.Ref(strings.Join(es, "\n")) |
| 120 | } |
| 121 | |
| 122 | // calculateSeverity returns: |
| 123 | // health.SeverityError if all proxies are unhealthy, |