Skip to content

Commit 53aa671

Browse files
committed
Add yaml.UseJSONMarshaler() to yaml.MarshalWithOptions()` calls
1 parent c9da895 commit 53aa671

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

internal/cmd/beta/affinity-groups/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func outputResult(p *print.Printer, model inputModel, resp iaas.AffinityGroup) e
136136
}
137137
p.Outputln(string(details))
138138
case print.YAMLOutputFormat:
139-
details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true))
139+
details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true), yaml.UseJSONMarshaler())
140140
if err != nil {
141141
return fmt.Errorf("marshal affinity group: %w", err)
142142
}

internal/cmd/beta/affinity-groups/describe/describe.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func outputResult(p *print.Printer, model inputModel, resp iaas.AffinityGroup) e
108108
}
109109
p.Outputln(string(details))
110110
case print.YAMLOutputFormat:
111-
details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true))
111+
details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true), yaml.UseJSONMarshaler())
112112
if err != nil {
113113
return fmt.Errorf("marshal affinity group: %w", err)
114114
}

internal/cmd/beta/affinity-groups/list/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func outputResult(p *print.Printer, model inputModel, items []iaas.AffinityGroup
130130
}
131131
p.Outputln(string(details))
132132
case print.YAMLOutputFormat:
133-
details, err := yaml.MarshalWithOptions(items, yaml.IndentSequence(true))
133+
details, err := yaml.MarshalWithOptions(items, yaml.IndentSequence(true), yaml.UseJSONMarshaler())
134134
if err != nil {
135135
return fmt.Errorf("marshal affinity groups: %w", err)
136136
}

0 commit comments

Comments
 (0)