go-yamledit is a Go library to edit YAML files while keeping YAML comments and indentation. It provides high-level API to edit YAML using goccy/go-yaml. If you need more flexibility and performance, use goccy/go-yaml directly. This package allows you to edit YAML files easily without operating complicated YAML AST. -
View it on GitHub