From 17780473f8c544506a918a1caf572e5491ba9652 Mon Sep 17 00:00:00 2001 From: Benson Fung Date: Thu, 5 Dec 2024 08:12:34 -0800 Subject: [PATCH] docs(vrl): add example syntax for valid expressions. (#21963) * 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' --- .../reference/remap/syntax/expressions.cue | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 website/cue/reference/remap/syntax/expressions.cue diff --git a/website/cue/reference/remap/syntax/expressions.cue b/website/cue/reference/remap/syntax/expressions.cue new file mode 100644 index 0000000000000..66de53b92496d --- /dev/null +++ b/website/cue/reference/remap/syntax/expressions.cue @@ -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" + """, + ] +}