MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / styleLine

Method styleLine

internal/tui/logs_tab.go:247–261  ·  view source on GitHub ↗
(line string)

Source from the content-addressed store, hash-verified

245}
246
247func (m logsTabModel) styleLine(line string) string {
248 if strings.Contains(line, "[error]") || strings.Contains(line, "[fatal]") {
249 return logErrorStyle.Render(line)
250 }
251 if strings.Contains(line, "[warn") {
252 return logWarnStyle.Render(line)
253 }
254 if strings.Contains(line, "[info") {
255 return logInfoStyle.Render(line)
256 }
257 if strings.Contains(line, "[debug]") {
258 return logDebugStyle.Render(line)
259 }
260 return line
261}

Callers 1

renderLogsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected