github.com/rabbouni145/gg@v0.47.1/docs/content/en/functions/in.md (about)

     1  ---
     2  title: in
     3  linktitle:
     4  description: Checks if an element is in an array or slice--or a substring in a string---and returns a boolean.
     5  godocref:
     6  date: 2017-02-01
     7  publishdate: 2017-02-01
     8  lastmod: 2017-02-01
     9  categories: [functions]
    10  menu:
    11    docs:
    12      parent: "functions"
    13  keywords: [strings]
    14  signature: ["in SET ITEM"]
    15  workson: []
    16  hugoversion:
    17  relatedfuncs: []
    18  deprecated: false
    19  aliases: []
    20  ---
    21  
    22  The elements supported are strings, integers and floats, although only float64 will match as expected.
    23  
    24  In addition, `in` can also check if a substring exists in a string.
    25  
    26  ```
    27  {{ if in .Params.tags "Git" }}Follow me on GitHub!{{ end }}
    28  ```
    29  
    30  
    31  ```
    32  {{ if in "this string contains a substring" "substring" }}Substring found!{{ end }}
    33  ```