output

package
v0.2.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package output provides response formatting with syntax highlighting and colorization for HTTP responses, JSON, and XML content.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter struct {
	// contains filtered or unexported fields
}

Formatter handles response formatting and colorization

func NewFormatter

func NewFormatter(colorEnabled bool) *Formatter

NewFormatter creates a new formatter

func (*Formatter) FormatBody

func (f *Formatter) FormatBody(resp *models.HttpResponse) string

FormatBody formats the response body

func (*Formatter) FormatError

func (f *Formatter) FormatError(err error) string

FormatError formats an error message

func (*Formatter) FormatHeaders

func (f *Formatter) FormatHeaders(resp *models.HttpResponse) string

FormatHeaders formats response headers

func (*Formatter) FormatInfo

func (f *Formatter) FormatInfo(msg string) string

FormatInfo formats an info message

func (*Formatter) FormatResponse

func (f *Formatter) FormatResponse(resp *models.HttpResponse) string

FormatResponse formats the full HTTP response

func (*Formatter) FormatSuccess

func (f *Formatter) FormatSuccess(msg string) string

FormatSuccess formats a success message

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL