(l stack.Location, main, exported bool)
| 116 | } |
| 117 | |
| 118 | func (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. |
| 154 | func (p *Palette) routineColor(first, multipleBuckets bool) string { |
no outgoing calls
no test coverage detected