diff --git a/docs/sources/logql/template_functions.md b/docs/sources/logql/template_functions.md index 2df9bff7dc..18abf34587 100644 --- a/docs/sources/logql/template_functions.md +++ b/docs/sources/logql/template_functions.md @@ -269,7 +269,7 @@ Signature: `contains(s string, src string) bool` Examples: ```template -{{ if .err contains "ErrTimeout" }} timeout {{end}} +{{ if contains .err "ErrTimeout" }} timeout {{end}} {{ if contains "he" "hello" }} yes {{end}} ``` @@ -285,7 +285,7 @@ Signatures: Examples: ```template -{{ if .err hasSuffix "Timeout" }} timeout {{end}} +{{ if hasSuffix .err "Timeout" }} timeout {{end}} {{ if hasPrefix "he" "hello" }} yes {{end}} ``` @@ -758,4 +758,4 @@ Examples: ```template "{{ .foo | duration_seconds }}" `{{ duration_seconds .foo }}` -``` \ No newline at end of file +```