format

package
v0.0.154 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package format normalizes bork source whitespace without changing its layout.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Files

func Files(paths []string, check bool) ([]string, error)

Files formats .bork files and recursively visits directories. An empty path list means the current directory. In check mode no files are written. The returned paths identify files that differ from the canonical format.

func Source

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

Source formats one file. Existing line breaks are retained, blank-line runs become one blank line, and nested delimiters use two spaces. Comments, literals, interpolations and unsafe Go bodies retain their exact text, except CRLF line comment endings become LF. Lexically invalid input is rejected; incomplete or ill-typed programs, including reserved compiler identifiers, can still be formatted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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