Skip to content

Commit

Permalink
docs: add section for working with registries groups in README
Browse files Browse the repository at this point in the history
  • Loading branch information
42atomys committed Nov 5, 2024
1 parent dfda72b commit c7cc1f4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ You can track our progress towards Sprout v1.0 by following the documentation pa
- [Creating a Handler](#creating-a-handler)
- [Customizing the Handler](#customizing-the-handler)
- [Working with Registries](#working-with-registries)
- [Working with Registries Groups](#working-with-registries-groups)
- [Building Function Maps](#building-function-maps)
- [Working with Templates](#working-with-templates)
- [Usage: Quick Example (code only)](#usage-quick-example)
Expand Down Expand Up @@ -118,6 +119,23 @@ handler.AddRegistries(
)
```

### Working with Registries Groups
In some cases, you can use a group of registries to add multiple registries at once.

You can retrieve all built-ins registries groups under [Registry Groups](https://docs.atom.codes/sprout/groups/list-of-all-registry-groups).

```go
import (
"github.com/go-sprout/sprout/group/all"
)

//...

handler.AddGroup(
all.RegistryGroup(),
)
```

### Building Function Maps

To use Sprout with templating engines like `html/template` or `text/template`, you need to build the function map:
Expand Down

0 comments on commit c7cc1f4

Please sign in to comment.