MCPcopy
hub / github.com/cli/cli / printRawReplies

Function printRawReplies

pkg/cmd/discussion/view/view.go:642–653  ·  view source on GitHub ↗

printRawReplies writes the replies of a comment as a sequence of metadata blocks, without any fields of the parent comment. Replies are printed in chronological order regardless of how they were fetched.

(out io.Writer, c *client.DiscussionComment)

Source from the content-addressed store, hash-verified

640// blocks, without any fields of the parent comment. Replies are printed in
641// chronological order regardless of how they were fetched.
642func printRawReplies(out io.Writer, c *client.DiscussionComment) error {
643 replies := slices.Clone(c.Replies.Comments)
644 if c.Replies.Direction == client.DiscussionCommentListDirectionBackward {
645 slices.Reverse(replies)
646 }
647
648 for _, reply := range replies {
649 printRawComment(out, reply)
650 }
651
652 return nil
653}

Callers 1

viewRunFunction · 0.85

Calls 2

printRawCommentFunction · 0.85
CloneMethod · 0.65

Tested by

no test coverage detected