MCPcopy
hub / github.com/cli/cli / Muted

Method Muted

pkg/iostreams/color.go:71–90  ·  view source on GitHub ↗
(t string)

Source from the content-addressed store, hash-verified

69}
70
71func (c *ColorScheme) Muted(t string) string {
72 // Fallback to previous logic if accessible colors preview is disabled.
73 if !c.Accessible {
74 return c.Gray(t)
75 }
76
77 // Muted text is only stylized if color is enabled.
78 if !c.Enabled {
79 return t
80 }
81
82 switch c.Theme {
83 case LightTheme:
84 return lightThemeMuted(t)
85 case DarkTheme:
86 return darkThemeMuted(t)
87 default:
88 return t
89 }
90}
91
92func (c *ColorScheme) Mutedf(t string, args ...interface{}) string {
93 return c.Muted(fmt.Sprintf(t, args...))

Callers 15

MutedfMethod · 0.95
printHumanViewFunction · 0.80
printHumanCommentFunction · 0.80
printDiscussionsFunction · 0.80
printSessionFunction · 0.80
printHumanIssuePreviewFunction · 0.80
PrintIssuesFunction · 0.80
viewRunFunction · 0.80
PromptGistsFunction · 0.80
createRunFunction · 0.80
renderLicenseFunction · 0.80

Calls 1

GrayMethod · 0.95

Tested by 1

TestMutedFunction · 0.64