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

Function printHumanCommentAndReplies

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

Source from the content-addressed store, hash-verified

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