Documentation ¶
Overview ¶
Package format implements formatting of Rego source files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ast ¶
Ast formats a Rego AST element. If the passed value is not a valid AST element, Ast returns nil and an error. If AST nodes are missing locations an arbitrary location will be used.
func AstWithOpts ¶ added in v0.44.0
Types ¶
type Opts ¶ added in v0.44.0
type Opts struct { // IgnoreLocations instructs the formatter not to use the AST nodes' locations // into account when laying out the code: notably, when the input is the result // of partial evaluation, arguments maybe have been shuffled around, but still // carry along their original source locations. IgnoreLocations bool }
Opts lets you control the code formatting via `AstWithOpts()`.
Click to show internal directories.
Click to hide internal directories.