format

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 7 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

Overview

Package format lays out Ant source as spec/fmt.md describes: it reprints the tokens, comments, and line breaks of a module, changing only whitespace, statement semicolons, and trailing commas.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Line

func Line(src string) string

Line formats the source of one expression on a single line, as an assert's report quotes it (section 8, assert): the spacing of ant fmt, every line break the author wrote between tokens dropped, and no comments. Line breaks inside a string or markup stay. A source that does not parse is returned as it is.

func Source

func Source(path string, src []byte) ([]byte, error)

Source formats one module. A source that does not parse returns the parser's error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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