Hugo config output

Hi - I had the bright idea of using a git hook on checkout, to run hugo config, so that I could output that to a file, and store the output in my repo, to let me see what I changed.

However, the maps are always getting re-arranged, so it always looks like it’s updated, every commit.

Is that the expected behavior, to have the maps be sort of randomly arranged in hugo config's output?

Sincerely,
Rick

in Go maps don’t have a defined order. They are somewhat randomly ordered
on purpose. We would need to use a different data structure (slice or
struct) to retain the order but neither maps well to a configuration.

We could sort on the print function if we wanted to though. That would keep
things consistent.

Thanks, @spf13. If it’s not a major pain, shall I make a feature request for it in the repo? I think it’s useful for troubleshooting.

There is an issue there somewhere about this.