You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(diag): migrates Diagnostics to a struct to track error state.
Features:
* Adds a number of new methods, `Len()`, `Merge(diags Diagnostics)` and `All() []Diagnostic`.
* Adds properties `HasFatal`, `HasError` and `HasWarn` to detect if a >=error level diagnostic has been recorded.
Migration:
* `diags = append(diags, diag)` should migrate to `diags.Append(diag)`.
* `diags = append(diags, newDiags...)` should migrate to `diags.Merge(newDiags)`.
* `len(diags)` should migrate to `diags.Len()`.
* any calls wanting all diagnostic messages must call `diags.All()`.
0 commit comments