Closed ank-everstake closed 3 weeks ago
Hi friend!
That's an interesting idea!
Sadly the fmt command is pretty dumb. It basically counts parens, commas, and semicolons and intelligently inserts whitespace along the way. Have it re-order lines is a much different problem.
I had never imagined gete-zones as a backup mechanism. It was created as a way to make "a decent first draft" of dnsconfig.js when migrating zones.
Closing. No possible given current architecture.
When you backup zone records using
get-zones
dnscontrol creates files with sorted recordsOur use-case (2 git branches):
This way, we can create proper diff between files in main and backup branches visually even without running dnscontrol. It will also allow to see duplicate records clearly before they get pushed to prod.
I propose to add ability to
fmt
that allows to get similar output with records that are sorted.