Help us shape the future of Go! Take the 2026 Go Developer Survey

canonicalize

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(in *ir.Document) (*ir.Document, error)

Apply normalizes a document into canonical 3.1 form, so two documents can be compared without dialect differences producing false drift. It performs the mechanical 3.0 -> 3.1 rewrites, bumps the version to 3.1.0, and returns a new IR whose Raw bytes are the re-rendered canonical form.

It re-parses from in.Raw so it owns a mutable doc + model, mutates the model, then RenderAndReload renders the mutated state (including our edits) to bytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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