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

Function printRawComment

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

Source from the content-addressed store, hash-verified

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

Callers 2

printRawCommentsFunction · 0.85
printRawRepliesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected