prettier

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JSON = Register("JSON", NewJSONPrettier())
)
View Source
var Registry = map[string]Prettier{}

Functions

This section is empty.

Types

type FallbackPrettier

type FallbackPrettier struct{}

func NewFallbackPrettier

func NewFallbackPrettier() *FallbackPrettier

func (*FallbackPrettier) Pretty

func (*FallbackPrettier) Pretty(content string) (string, error)

type JSONPrettier

type JSONPrettier struct{}

func NewJSONPrettier

func NewJSONPrettier() *JSONPrettier

func (*JSONPrettier) Pretty

func (*JSONPrettier) Pretty(j string) (string, error)

type Prettier

type Prettier interface {
	Pretty(content string) (string, error)
}

func Get

func Get(name string) Prettier

func Register

func Register(name string, p Prettier) Prettier

Jump to

Keyboard shortcuts

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