formatter

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executable

type Executable struct {
	// contains filtered or unexported fields
}

func NewExecutable

func NewExecutable(rawCmd string) *Executable

func (*Executable) Format

func (e *Executable) Format(ctx context.Context, src []byte) ([]byte, error)

func (*Executable) IsGofmtCompliant

func (e *Executable) IsGofmtCompliant() bool

IsGofmtCompliant returns true if the formatter is compliant with gofmt.

The goal is to avoid formatting after the Shortener if it's not necessary:

  • `gofmt` is run by the Shortener
  • `goimports` is based on `gofmt` but also changes the order of the imports, but the Shortener doesn't change the order of the imports.

Jump to

Keyboard shortcuts

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