MCPcopy
hub / github.com/cli/cli / RenderAnnotations

Function RenderAnnotations

pkg/cmd/run/shared/presentation.go:92–102  ·  view source on GitHub ↗
(cs *iostreams.ColorScheme, annotations []Annotation)

Source from the content-addressed store, hash-verified

90}
91
92func RenderAnnotations(cs *iostreams.ColorScheme, annotations []Annotation) string {
93 lines := []string{}
94
95 for _, a := range annotations {
96 lines = append(lines, fmt.Sprintf("%s %s", AnnotationSymbol(cs, a), a.Message))
97 // Following newline is essential for spacing between annotations
98 lines = append(lines, cs.Mutedf("%s: %s#%d\n", a.JobName, a.Path, a.StartLine))
99 }
100
101 return strings.Join(lines, "\n")
102}

Callers 2

runViewFunction · 0.92
renderRunFunction · 0.92

Calls 3

AnnotationSymbolFunction · 0.85
MutedfMethod · 0.80
JoinMethod · 0.80

Tested by

no test coverage detected