Skip to content

feat: allow colored formatting #21

Description

@ernado

Use github.com/fatih/color, highlight error text, stacktrace parts (line number, path to file, stacktrace element) with different colors and bold/faint.

Example of colored formatted string:

fmt.Println(
	color.New(color.FgCyan).Sprintf("[%5s]", time.Since(start).Round(time.Second)),
	color.New().Sprint(req.Method),
	color.New(color.Faint).Sprint(req.URL),
	color.New(color.FgYellow).Sprint(lastStatus),
)

Probably implement it as some variant of %+v formatting (do we support flags in formatting strings here?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions