jfmt – zgo.at/jfmt Index | Files | Directories

package jfmt

import "zgo.at/jfmt"

Index

Types

type Formatter

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

func NewFormatter

func NewFormatter(width int, prefix, 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

Directories

PathSynopsis
cmd
cmd/jfmt
Version
v0.0.0-20240726113937-e6436421fade (latest)
Published
Jul 26, 2024
Platform
linux/amd64
Imports
10 packages
Last checked
2 weeks ago

Tools for package owners.