formatter

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDataIsNotStringable = errors.New("data is not a string-able")

Functions

This section is empty.

Types

type BinaryData added in v1.3.0

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

func NewBinaryData added in v1.3.0

func NewBinaryData(data []byte, fileName, mimeType string) *BinaryData

type Html

type Html struct{}

func NewHtml

func NewHtml() *Html

func (*Html) Write

func (h *Html) Write(w http.ResponseWriter, statusCode int, data any) error

type Json

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

func NewJson

func NewJson() *Json

func NewJsonPretty

func NewJsonPretty() *Json

func (*Json) Pretty

func (j *Json) Pretty() *Json

func (*Json) Write

func (j *Json) Write(w http.ResponseWriter, statusCode int, data any) error

type Xml

type Xml struct{}

func NewXml

func NewXml() *Xml

func (*Xml) Write

func (x *Xml) Write(w http.ResponseWriter, statusCode int, data any) error

Jump to

Keyboard shortcuts

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