-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support passing non-string args to templates.
- Loading branch information
Showing
4 changed files
with
28 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
rows: | ||
{{ range $email, $avatarUrl := .users }} | ||
users:uuid({{ $email }}): | ||
id: users:uuid({{ $email }}) | ||
email: {{ $email }} | ||
avatar_id: avatars:uuid({{ $avatarUrl }}) | ||
avatars:uuid({{ $avatarUrl }}): | ||
id: avatars:uuid({{ $avatarUrl }}) | ||
url: {{ $avatarUrl }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,12 @@ rows: | |
email: [email protected] | ||
avatarUrl: image.png | ||
avatarGrayscale: false | ||
# Templates actually end up replacing the row, so if you don't use rowId in | ||
# the template you can get away with using other variables as seeds. | ||
bulk_users: | ||
template: template_users.yml | ||
users: | ||
[email protected]: a.png | ||
[email protected]: b.png | ||
[email protected]: c.png | ||
[email protected]: d.png |