MCPcopy Create free account
hub / github.com/cli/cli / copyLogWithLinePrefix

Function copyLogWithLinePrefix

pkg/cmd/run/view/view.go:605–612  ·  view source on GitHub ↗
(w io.Writer, r io.Reader, prefix string)

Source from the content-addressed store, hash-verified

603}
604
605func copyLogWithLinePrefix(w io.Writer, r io.Reader, prefix string) error {
606 sanitized := transform.NewReader(r, &asciisanitizer.Sanitizer{})
607 scanner := bufio.NewScanner(sanitized)
608 for scanner.Scan() {
609 fmt.Fprintf(w, "%s%s\n", prefix, scanner.Text())
610 }
611 return nil
612}

Calls

no outgoing calls