Hacker News new | past | comments | ask | show | jobs | submit login

--flagfile gets me really far but to be fair it sucks when you need nested kv



just use longer keys (with an ad-hoc separator, if you want)


What about lists? Something like:

  --allowed-downtime-0-start=20230523170000Z
  --allowed-downtime-0-end=20230523170500Z
  --allowed-downtime-1-start=...
Or

  --allowed-downtime-start='20230523170000Z,...'
I can live with them, but neither looks clean :(

Genuine question, as I actually like the plain old flagfiles/Java-properties-ish style.


The output produced by gron looks quite clean to me. You just write your file as if it was a list of js variable assignments.

    allowed-downtime[0][0] = 20230523170000Z
    allowed-downtime[0][1] = 20230523170500Z
    allowed-downtime[1][0] = ...
or if you absolutely want the names, you can make a "list of dictionaries":

    allowed-downtime[0].start = ...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: