MCPcopy
hub / github.com/cli/cli / printHumanCommentAndReplies

Function printHumanCommentAndReplies

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

Source from the content-addressed store, hash-verified

621}
622
623func printHumanCommentAndReplies(opts *ViewOptions, c *client.DiscussionComment) error {
624 out := opts.IO.Out
625 cs := opts.IO.ColorScheme()
626
627 if err := printHumanComment(opts, out, *c, "", false, false); err != nil {
628 return err
629 }
630
631 if c.Replies.NextCursor != "" {
632 fmt.Fprintf(out, cs.Muted("To see more replies, pass: --after %s\n"), c.Replies.NextCursor)
633 fmt.Fprintln(out)
634 }
635
636 return nil
637}
638
639// printRawReplies writes the replies of a comment as a sequence of metadata
640// 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