Skip to content

Commit

Permalink
Docs: Explain %T behavior of sprintf
Browse files Browse the repository at this point in the history
Fixes #6487

Signed-off-by: Luiz Carvalho <lucarval@redhat.com>
  • Loading branch information
lcarva authored and ashutosh-narkar committed Dec 18, 2023
1 parent 6d26f98 commit ba46112
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/content/policy-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,13 @@ complex types.


{{< builtin-table strings >}}

{{< info >}}
When using `sprintf`, values are pre-processed and may have an unexpected type. For example,
`%T` evaluates to `string` for both `string` and `boolean` types. In such cases, use `type_name` to
accurately evaluate the underlying type.
{{< /info >}}

{{< builtin-table regex >}}

{{< builtin-table glob >}}
Expand Down

0 comments on commit ba46112

Please sign in to comment.