Skip to content

Commit

Permalink
docs(vrl): add example syntax for valid expressions. (#21963)
Browse files Browse the repository at this point in the history
* docs(vrl): add example syntax for valid expressions.

* fix spelling

* fix grammar and trailing whitespace from 'cargo vdev check fmt'

* run 'cue fmt' to pass 'make check-docs'
  • Loading branch information
bfung authored Dec 5, 2024
1 parent f929a9a commit 75f35e2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions website/cue/reference/remap/syntax/expressions.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package metadata

remap: syntax: expressions: {
title: "Expressions"
description: """
VRL programs are made up of literal and dynamic expressions, described more in detail below. Expressions can be separated by newline or semicolon in any combination.
"""

examples: [
"""
# newline delimited expressions
del(.user_info)
.timestamp = now()
.message = "hello world"
""",
"""
# semicolon delimited expressions
del(.user_info); .timestamp = now()
.message = "hello world"
""",
]
}

0 comments on commit 75f35e2

Please sign in to comment.