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

Function printRawComment

pkg/cmd/discussion/view/view.go:595–605  ·  view source on GitHub ↗
(out io.Writer, c client.DiscussionComment)

Source from the content-addressed store, hash-verified

593}
594
595func printRawComment(out io.Writer, c client.DiscussionComment) {
596 fmt.Fprintf(out, "author:\t%s\n", c.Author.Login)
597 fmt.Fprintf(out, "created:\t%s\n", c.CreatedAt.Format(time.RFC3339))
598 fmt.Fprintf(out, "url:\t%s\n", c.URL)
599 if c.IsAnswer {
600 fmt.Fprintln(out, "answer:\ttrue")
601 }
602 fmt.Fprintln(out, "--")
603 fmt.Fprintln(out, c.Body)
604 fmt.Fprintln(out, "--")
605}
606
607func labelList(labels []client.DiscussionLabel, cs *iostreams.ColorScheme) string {
608 if len(labels) == 0 {

Callers 2

printRawCommentsFunction · 0.85
printRawRepliesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected