You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Features
New output.FormatYAML constant; ParseFormat recognizes yaml and yml
New output.Format.IsStructured() helper (true for JSON/YAML) to keep
future format additions to a single call site per command instead of N
New base.PrintYAML / base.PrintFormatted helpers in internal/cmd/base
All 30 commands that previously branched on outputFmt == output.FormatJSON
now branch on outputFmt.IsStructured() and call base.PrintFormatted
Three commands with inline json.MarshalIndent (records/update.go, groups/members.go, groups/zones.go) normalized to use the same base.PrintFormatted helper as everything else
Added yaml:"..." struct tags (mirroring the existing json:"..." tags)
to all CLI output schema types (internal/schema/{zone,record,user,group}.go)
so YAML keys stay snake_case (zone_id) instead of falling back to gopkg.in/yaml.v3's default lowercase-no-separator naming (zoneid)
README: documented -o yaml in both the global flags table and the
Output Formats section
Tests: ParseFormat and new IsStructured() coverage for yaml/yml