arranger

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arranger

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

Arranger represents a source code arranger for go packages.

func New

func New(pkg *ast.Package, set *token.FileSet) Arranger

New creates a new arranger for the given package and file set.

The given package must have been parsed with the given file set.

func (Arranger) Arrange

func (a Arranger) Arrange(file *ast.File, src []byte) []byte

Arrange arranges the given file with the given arranger.

The given file must be part of the given arranger's package, and its contents should be represented by the given bytes. This method returns an arranged copy of the given contents.

func (Arranger) Arranged

func (a Arranger) Arranged(file *ast.File) bool

Arranged checks whether the given file is arranged according to the given arranger.

The given file must be part of the given arranger's package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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