modulepackage
0.0.0-20250213043600-85dd1b5a9bb7
Repository: https://github.com/elastic/celfmt.git
Documentation: pkg.go.dev
# README
celfmt
This contains a library function, celfmt.Format
that can be used to canonically format CEL programs in a non-minified way and a zero-configuration command that uses that function to format CEL programs.
The command can be installed with go install github.com/elastic/celfmt/cmd/celfmt@latest
.
celfmt.Format
is forked from the original minifying formatter here.
The command may be used to format CEL programs in elastic agent integration configurations with some limitations. In particular, CEL programs MUST be included in YAML pipe string literals with the field name program
starting from the first column of the line.
License
This software is licensed under the Apache License, version 2 ("Apache-2.0").
# Packages
No description provided by the author
# Functions
No description provided by the author
Format takes an input expression and source information and generates a human-readable expression, writing it to dst.
No description provided by the author
WrapAfterColumnLimit dictates whether to insert a newline before or after the specified operator when word wrapping is performed.
WrapOnColumn wraps the output expression when its string length exceeds a specified limit for operators set by WrapOnOperators function or by default, "&&" and "||" will be wrapped.
WrapOnOperators specifies which operators to perform word wrapping on an output expression when its string length exceeds the column limit set by WrapOnColumn function.
# Type aliases
FormatOption is a functional option for configuring the output formatting of the Unparse function.