WriteAlertWarning writes a human-readable content-safety warning to w. Used by non-JSON output paths (pretty, table, csv) in warn mode.
(w io.Writer, alert *extcs.Alert)
| 51 | // WriteAlertWarning writes a human-readable content-safety warning to w. |
| 52 | // Used by non-JSON output paths (pretty, table, csv) in warn mode. |
| 53 | func WriteAlertWarning(w io.Writer, alert *extcs.Alert) { |
| 54 | if alert == nil { |
| 55 | return |
| 56 | } |
| 57 | fmt.Fprintf(w, "warning: content safety alert from %s (rules: %s)\n", |
| 58 | alert.Provider, strings.Join(alert.MatchedRules, ", ")) |
| 59 | } |
no outgoing calls