couchbaselabs / couchbaselabs/couchbase-shell

Loop support with fake and tera

Open
#53 2 comments 0 reactions 0 assignees View on GitHub
cmd: fake
Dominant language
Rust
Stars
87
Forks
18
PR merge metrics
No merged PRs in 30d

Description

based on tera, I tried this…

```
👤ingenthr at 🏠local in 🗄 default
> fake --template order-wip.tera --num-rows 5 | get content | get order_items
error: Error: expected `,` or `]` at line 11 column 26

👤ingenthr at 🏠local in 🗄 default
> open order-wip.tera
{
"id": "{{ uuid() }}",
"content": {
"order_by": "{{ userName() }}",
"address": "{{ numberWithFormat(format='^####') ~ ' ' ~
streetName() ~ '\n' ~
cityName() ~ ', ' ~
stateAbbr() ~ ' ' ~
postCode() }}",
"order_items": [
{% for i in range(end=5) %}
{ "qty": "{{ numberWithFormat(format='^#')}}",
"item": "{{ words(num=3) }}" }
{% endfor %}
],
"type": "order"
}
}
```

But it does not work. There does not seem to be looping support?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.