(key string, diag hcl.Diagnostics)
| 74 | } |
| 75 | |
| 76 | func (e *DiagnosticError) Extend(key string, diag hcl.Diagnostics) { |
| 77 | if e.KeyedDiagnostics == nil { |
| 78 | e.KeyedDiagnostics = make(map[string]hcl.Diagnostics) |
| 79 | } |
| 80 | if _, ok := e.KeyedDiagnostics[key]; !ok { |
| 81 | e.KeyedDiagnostics[key] = hcl.Diagnostics{} |
| 82 | } |
| 83 | e.KeyedDiagnostics[key] = e.KeyedDiagnostics[key].Extend(diag) |
| 84 | } |
| 85 | |
| 86 | func (e *DiagnosticError) Response() (int, codersdk.Response) { |
| 87 | resp := codersdk.Response{ |
no outgoing calls
no test coverage detected