formatter

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(src string, opts Options) (string, error)

Types

type Doc

type Doc interface {
	// contains filtered or unexported methods
}

type Options

type Options struct {
	Width  int
	Indent int
}

type Trivia

type Trivia struct {
	Line    int
	EndLine int
	Col     int
	Kind    TriviaKind
	Text    string
}

type TriviaKind

type TriviaKind int
const (
	LineComment TriviaKind = iota
	LongComment
	BlankLine
)

Jump to

Keyboard shortcuts

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