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

Function printHumanCommentAndReplies

pkg/cmd/discussion/view/view.go:628–642  ·  view source on GitHub ↗
(opts *ViewOptions, c *client.DiscussionComment)

Source from the content-addressed store, hash-verified

626}
627
628func printHumanCommentAndReplies(opts *ViewOptions, c *client.DiscussionComment) error {
629 out := opts.IO.Out
630 cs := opts.IO.ColorScheme()
631
632 if err := printHumanComment(opts, out, *c, "", false, false); err != nil {
633 return err
634 }
635
636 if c.Replies.NextCursor != "" {
637 fmt.Fprintf(out, cs.Muted("To see more replies, pass: --after %s\n"), c.Replies.NextCursor)
638 fmt.Fprintln(out)
639 }
640
641 return nil
642}
643
644// printRawReplies writes the replies of a comment as a sequence of metadata
645// blocks, without any fields of the parent comment. Replies are printed in

Callers 1

viewRunFunction · 0.85

Calls 3

printHumanCommentFunction · 0.85
ColorSchemeMethod · 0.80
MutedMethod · 0.80

Tested by

no test coverage detected