Documentation
¶
Overview ¶
Package formatters groups the formatting tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONFormat ¶
type JSONFormat struct{}
JSONFormat indents, minifies and sorts JSON.
func (JSONFormat) Detect ¶
func (JSONFormat) Detect(sample string) float64
Detect recognises a valid JSON object or array.
func (JSONFormat) Spec ¶
func (JSONFormat) Spec() tool.Spec
type XMLFormat ¶
type XMLFormat struct{}
XMLFormat re-indents XML keeping each token's original text (attributes, comments, CDATA, processing instructions and DOCTYPE).
func (XMLFormat) Detect ¶
Detect recognises XML that tokenises without errors in its first 50 tokens and has at least one element.