Documentation
¶
Overview ¶
Package format provides unified Go formatting in a single pass. It combines: import fixing, line shortening, and gofumpt-style rules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter performs unified Go formatting.
type Options ¶
type Options struct {
// LineLength is the target maximum line length (default: 100)
LineLength int
// TabWidth is the width of a tab (default: 4)
TabWidth int
// GoVersion for version-specific rules (e.g., "go1.24")
GoVersion string
// ModulePath for import grouping
ModulePath string
// LocalPrefixes for local import grouping
LocalPrefixes []string
// ExtraRules enables stricter gofumpt rules
ExtraRules bool
// SkipTypeInfo disables type loading (faster but less accurate import detection)
SkipTypeInfo bool
}
Options configures the formatter.
Click to show internal directories.
Click to hide internal directories.