Skip to content

v3.1.0

Choose a tag to compare

@github-actions github-actions released this 18 Sep 08:52
e2aab20

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