newContentWriter returns the writer to wire up as ContentOut. When sanitize is true it inserts an asciisanitizer in front of the underlying writer; otherwise it returns the underlying writer directly so writes reach stdout unchanged.
(out io.Writer, sanitize bool)
| 501 | // writer; otherwise it returns the underlying writer directly so writes |
| 502 | // reach stdout unchanged. |
| 503 | func newContentWriter(out io.Writer, sanitize bool) io.Writer { |
| 504 | if !sanitize { |
| 505 | return out |
| 506 | } |
| 507 | return transform.NewWriter(out, &asciisanitizer.Sanitizer{}) |
| 508 | } |
| 509 | |
| 510 | func System() *IOStreams { |
| 511 | terminal := ghTerm.FromEnv() |
no outgoing calls