formatutil

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RearrangeFuncs

func RearrangeFuncs(src []byte, filename ...string) ([]byte, error)

RearrangeFuncs rearranges functions in src.

func SourceEx

func SourceEx(src []byte, classInfo parser.ClassInfoFunc, filename ...string) (formatted []byte, err error)

SourceEx formats src in canonical xgofmt style and returns the result or an (I/O or syntax) error. src is expected to be a syntactically correct XGo source file, or a list of XGo declarations or statements.

If src is a partial source file, the leading and trailing space of src is applied to the result (such that it has the same leading and trailing space as src), and the result is indented by the same amount as the first line of src containing code. Imports are not sorted for partial source files.

Types

This section is empty.

Jump to

Keyboard shortcuts

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