Documentation
¶
Index ¶
- func Format(src []byte) ([]byte, error)
- func FormatSafe(src []byte, opts Options) []byte
- func FormatWithOptions(src []byte, opts Options) ([]byte, error)
- type ArrayValue
- type Comment
- type CommentKind
- type Document
- type Import
- type Node
- type Object
- type ObjectValue
- type Options
- type Property
- type RawValue
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatSafe ¶
Types ¶
type ArrayValue ¶
type ArrayValue struct {
Items []Value
}
type Comment ¶
type Comment struct {
Text string
Kind CommentKind
BlankBefore int
}
type Import ¶
Import is a top-level `import QtQuick 2.0` / `import "path"` statement. It is passed through verbatim.
type ObjectValue ¶
type Options ¶
func DefaultOptions ¶
func DefaultOptions() Options
func ProjectOptions ¶
func ProjectOptions() Options
ProjectOptions is the formatting style used by this repository's QML files (see examples/enterprise): two-space indent and a 100-column inline budget. cmd/tools/qmlfmt exposes the same values as --indent and --max-line; tests use them directly.