format

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCSS added in v0.16.0

func FormatCSS(buf []byte, p *core.Printer) error

FormatCSS formats the provided CSS to the Printer.

func FormatCSSIndented added in v0.16.0

func FormatCSSIndented(buf []byte, p *core.Printer, baseIndent int) error

FormatCSSIndented formats CSS with a base indentation level. Used for formatting CSS embedded in HTML <style> tags.

func FormatCSV added in v0.16.0

func FormatCSV(buf []byte, p *core.Printer) error

FormatCSV formats the provided CSV data to the Printer.

func FormatEventStream added in v0.6.0

func FormatEventStream(r io.Reader, p *core.Printer) error

FormatEventStream formats the provided stream of server sent events to the Printer, flushing after each event.

func FormatHTML added in v0.16.0

func FormatHTML(buf []byte, w *core.Printer) error

FormatHTML formats the provided HTML to the Printer.

func FormatJSON

func FormatJSON(buf []byte, p *core.Printer) error

FormatJSON formats the provided raw JSON data to the Printer.

func FormatMsgPack added in v0.12.0

func FormatMsgPack(buf []byte, p *core.Printer) error

FormatMsgPack formats the provided raw MessagePack data to the Printer as JSON.

func FormatNDJSON added in v0.5.0

func FormatNDJSON(r io.Reader, p *core.Printer) error

FormatNDJSON streams the provided newline-delimited JSON to the Printer, flushing every line.

func FormatProtobuf added in v0.16.0

func FormatProtobuf(buf []byte, p *core.Printer) error

FormatProtobuf formats the provided raw protobuf data to the Printer.

func FormatProtobufWithDescriptor added in v0.16.0

func FormatProtobufWithDescriptor(buf []byte, md protoreflect.MessageDescriptor, p *core.Printer) error

FormatProtobufWithDescriptor formats protobuf data as JSON using a message descriptor.

func FormatProtobufWithSchema added in v0.16.0

func FormatProtobufWithSchema(buf []byte, schema *fetchproto.Schema, typeName string, p *core.Printer) error

FormatProtobufWithSchema formats protobuf data as JSON using the provided schema.

func FormatXML

func FormatXML(buf []byte, w *core.Printer) error

FormatXML formats the provided XML to the Printer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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