Skip to content

Commit

Permalink
docs: fix truncate arguments (#19068)
Browse files Browse the repository at this point in the history
* docs: truncate arg 'suffix' is string, not bool

* docs: fix required args for truncate

The arguments `ellipsis` and `suffix` are not required.
[Refer to VRL source](https://github.com/vectordotdev/vrl/blob/37319dfca17dc5d7637b24455199029cc30eb128/src/stdlib/truncate.rs#L48) to confirm.
  • Loading branch information
c3pmark authored Nov 6, 2023
1 parent 7a7b53b commit e9e7336
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions website/cue/reference/remap/functions/truncate.cue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ remap: functions: truncate: {
This argument is deprecated. An ellipsis (`...`) is appended if this is set to `true` _and_ the `value` string
ends up being truncated because it's exceeded the `limit`.
"""
required: true
required: false
type: ["boolean"]
},
{
Expand All @@ -34,8 +34,8 @@ remap: functions: truncate: {
A custom suffix (`...`) will be appended to truncated strings.
This is ignored if "ellipsis" is set to true for backwards compatibility.
"""
required: true
type: ["boolean"]
required: false
type: ["string"]
},
]
internal_failure_reasons: []
Expand Down

0 comments on commit e9e7336

Please sign in to comment.