Skip to content

Commit

Permalink
Inlcude example of newScratch.Values
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed Nov 15, 2023
1 parent c2a0f00 commit 9d64e74
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions content/en/functions/collections/NewScratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,11 @@ Delete

Values
: Returns the raw backing map. Do not use with `Scratch` or `Store` methods on a `Page` object due to concurrency issues.

```go-html-template
{{ $s := newScratch }}
{{ $s.SetInMap "greetings" "english" "Hello" }}
{{ $s.SetInMap "greetings" "french" "Bonjour" }}
{{ $map := $s.Values }}
```

0 comments on commit 9d64e74

Please sign in to comment.