Skip to content

Commit

Permalink
remove html escape (#284)
Browse files Browse the repository at this point in the history
Signed-off-by: Manabu McCloskey <[email protected]>
  • Loading branch information
nabuskey authored Jun 6, 2024
1 parent c35c33e commit 4a972e3
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pkg/cmd/get/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,10 @@ func renderTemplate(templatePath string, outWriter io.Writer, data []any) error
func printOutput(templatePath string, outWriter io.Writer, data []any, format string) error {
switch format {
case "json":
b, err := json.MarshalIndent(data, "", " ")
if err != nil {
return err
}
b = append(b, []byte("\n")...)
_, err = outWriter.Write(b)
return err
enc := json.NewEncoder(outWriter)
enc.SetEscapeHTML(false)
enc.SetIndent("", " ")
return enc.Encode(data)
case "yaml":
b, err := yaml.Marshal(data)
if err != nil {
Expand Down

0 comments on commit 4a972e3

Please sign in to comment.