Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'

This commit is contained in:
Bjørn Erik Pedersen
2023-12-04 15:24:01 +01:00
810 changed files with 24147 additions and 7766 deletions

View File

@@ -1,21 +1,27 @@
---
title: collections.In
linkTitle: in
description: Reports whether an element is in an array or slice, or if a substring is in a string.
description: Reports whether the given value is a member of the given set.
categories: []
keywords: []
menu:
docs:
parent: functions
function:
action:
aliases: [in]
related:
- functions/collections/Slice
- functions/strings/Contains
- functions/strings/ContainsAny
- functions/strings/ContainsNonSpace
- functions/strings/HasPrefix
- functions/strings/HasSuffix
returnType: bool
signatures: [collections.In SET ITEM]
relatedFunctions:
- collections.Slice
signatures: [collections.In SET VALUE]
aliases: [/functions/in]
---
The `SET` can be an [array], [slice], or [string].
[array]: /getting-started/glossary/#array
[slice]: /getting-started/glossary/#slice
[string]: /getting-started/glossary/#string
```go-html-template
{{ $s := slice "a" "b" "c" }}