formatter

package
v0.3.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(format string, resp *http.Response) ([]byte, error)

Format generate formatted result for response.

Types

type Formatter

type Formatter interface {
	Format(*http.Response) ([]byte, error)
}

Formatter generate formatted result for response.

type JsonFormatter

type JsonFormatter struct{}

JsonFormatter use to convert response to json format.

func (*JsonFormatter) Format

func (f *JsonFormatter) Format(resp *http.Response) ([]byte, error)

type TableFormatter

type TableFormatter struct{}

TableFormatter use to convert response to table format.

func (*TableFormatter) Format

func (f *TableFormatter) Format(resp *http.Response) ([]byte, error)

type YamlFormatter

type YamlFormatter struct{}

YamlFormatter use to convert response to yaml format.

func (*YamlFormatter) Format

func (f *YamlFormatter) Format(resp *http.Response) ([]byte, error)

Jump to

Keyboard shortcuts

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