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

Function printRawReplies

pkg/cmd/discussion/view/view.go:647–658  ·  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

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

Callers 1

viewRunFunction · 0.85

Calls 2

printRawCommentFunction · 0.85
CloneMethod · 0.65

Tested by

no test coverage detected