mirror of
https://github.com/ruuda/rcl.git
synced 2025-10-10 00:42:13 +00:00

In the past I did not autoformat them because I was not happy with the output yet, but now the formatter is good enough that I'm willing to take this. There are still a few cases where I'm like ... meh, but that requires human judgement that I think a formatter can never get right, so I'm willing to stop arguing about this to get a formatter. Possibly in the future I can add the magic trailing comma like Black has in Python, to force collections to be tall. That could still be nice. We can do that in a follow-up.
13 lines
372 B
Text
13 lines
372 B
Text
// See docs/tutorial.md for the origin of this example.
|
|
{
|
|
buckets = [
|
|
let retention_days = { hourly = 4, daily = 30, monthly = 365 };
|
|
for database in ["alpha", "bravo"]:
|
|
for period, days in retention_days:
|
|
{
|
|
name = f"{database}-{period}",
|
|
region = "eu-west",
|
|
lifecycle_policy = { delete_after_seconds = days * 24 * 3600 },
|
|
}
|
|
],
|
|
}
|