YAML has comments for a reasonyamldoc is the editing half of YAML for Go: change one key and every byte you did not touch comes back exactly as it went in, comments included. It now has an engine of its own, and the numbers to show why.