Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'

This commit is contained in:
Bjørn Erik Pedersen
2025-04-10 13:04:51 +02:00
987 changed files with 12379 additions and 14083 deletions

View File

@@ -3,11 +3,11 @@ title: math.Counter
description: Increments and returns a global counter.
categories: []
keywords: []
action:
aliases: []
related: []
returnType: uint64
signatures: [math.Counter]
params:
functions_and_methods:
aliases: []
returnType: uint64
signatures: [math.Counter]
---
The counter is global for both monolingual and multilingual sites, and its initial value for each build is 1.
@@ -27,9 +27,7 @@ Use this function to:
- Create unique warnings as shown above; the [`warnf`] function suppresses duplicate messages
- Create unique target paths for the `resources.FromString` function where the target path is also the cache key
[`warnf`]: /functions/fmt/warnf/
[`resources.FromString`]: /functions/resources/fromstring/
> [!note]
> Due to concurrency, the value returned in a given template for a given page will vary from one build to the next. You cannot use this function to assign a static id to each page.
{{% note %}}
Due to concurrency, the value returned in a given template for a given page will vary from one build to the next. You cannot use this function to assign a static id to each page.
{{% /note %}}
[`warnf`]: /functions/fmt/warnf/