jfmt – zgo.at/jfmt Index | Files

package jfmt

import "zgo.at/jfmt"

Index

Types

type Formatter

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

func NewFormatter

func NewFormatter(width int, ident string) *Formatter

func (*Formatter) Format

func (f *Formatter) Format(w io.Writer, r io.Reader) error

Format the reader to the writer.

func (*Formatter) FormatString

func (f *Formatter) FormatString(j string) (string, error)

Format the string.

func (*Formatter) Highlight

func (f *Formatter) Highlight(what, start, stop string)

Highlight sets the syntax highlighting.

what can be key, str, num, bool, or null.

Default is to not highlight anything.

Source Files

jfmt.go

Version
v0.0.0-20240428154335-af97c9b4f565 (latest)
Published
Apr 28, 2024
Platform
linux/amd64
Imports
11 packages
Last checked
2 weeks ago

Tools for package owners.