Docs: Fix links in Using Go's templating language (#60564)

This commit is contained in:
George Robinson
2022-12-20 12:30:43 +00:00
committed by GitHub
parent 4d693863c0
commit 5d4e35c3d5

View File

@@ -18,7 +18,7 @@ Before you start creating your own message templates, we recommend that you read
## Dot
In text/template there is a special cursor called dot, and is written as `.`. You can think of this cursor as a variable whose value changes depending where in the template it is used. For example, at the start of a message template `.` refers to something called [`ExtendedData`]({{< relref "./reference" >}}) which contains a number of fields including `Alerts`, `Status`, `GroupLabels`, `CommonLabels`, `CommonAnnotations` and `ExternalURL`. However, dot might refer to something else when used in a range over a list, when used inside a `with`, or when writing feature templates to be used in other templates. You can see examples of this in [Template examples]({{< relref "./template-examples" >}}), and all data and functions in the [Reference]({{< relref "./reference" >}}).
In text/template there is a special cursor called dot, and is written as `.`. You can think of this cursor as a variable whose value changes depending where in the template it is used. For example, at the start of a message template `.` refers to something called [`ExtendedData`]({{< relref "./reference#extendeddata" >}}) which contains a number of fields including `Alerts`, `Status`, `GroupLabels`, `CommonLabels`, `CommonAnnotations` and `ExternalURL`. However, dot might refer to something else when used in a range over a list, when used inside a `with`, or when writing feature templates to be used in other templates. You can see examples of this in [Create message templates]({{< relref "./create-message-templates" >}}), and all data and functions in the [Reference]({{< relref "./reference" >}}).
## Opening and closing tags