MCPcopy Index your code
hub / github.com/maruel/panicparse / funcColor

Method funcColor

internal/ui.go:118–151  ·  view source on GitHub ↗
(l stack.Location, main, exported bool)

Source from the content-addressed store, hash-verified

116}
117
118func (p *Palette) funcColor(l stack.Location, main, exported bool) string {
119 if main {
120 return p.FuncMain
121 }
122 switch l {
123 default:
124 fallthrough
125 case stack.LocationUnknown:
126 if exported {
127 return p.FuncLocationUnknownExported
128 }
129 return p.FuncLocationUnknown
130 case stack.GoMod:
131 if exported {
132 return p.FuncGoModExported
133 }
134 return p.FuncGoMod
135 case stack.GOPATH:
136 if exported {
137 return p.FuncGOPATHExported
138 }
139 return p.FuncGOPATH
140 case stack.GoPkg:
141 if exported {
142 return p.FuncGoPkgExported
143 }
144 return p.FuncGoPkg
145 case stack.Stdlib:
146 if exported {
147 return p.FuncStdLibExported
148 }
149 return p.FuncStdLib
150 }
151}
152
153// routineColor returns the color for the header of the goroutines bucket.
154func (p *Palette) routineColor(first, multipleBuckets bool) string {

Callers 2

functionColorMethod · 0.95
MainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected