Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Marshal yaml with 2 space indents #5

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

alexstojda
Copy link
Collaborator

  • Also return error when no releases found

- Also return error when no releases found
@alexstojda alexstojda requested review from a team, riclima and felleg and removed request for a team June 14, 2023 19:45
@@ -1,8 +1,11 @@
package utils

import (
"bytes"
"errors"
"fmt"
"gopkg.in/yaml.v3"
Copy link

@riclima riclima Jun 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIY, but I discovered yesterday while playing around with making YAML patches using Go that yaml.v3 does not format lists like yaml.v2 on output (i.e., like kubectl does), with no option to go back to the old setting. Reasoning from the devs is that the old way had weird edge cases and new way doesn't, so "breaking" change in v3.

Old:

favorites:
  fruit: apple
  car: ford
fruits:
- apple
- orange

New:

favorites:
  fruit: apple
  car: ford
fruits:
  - apple
  - orange

I like new better. Makes more sense.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I like the new formatting better too, minus their decision to default the indents to 4 spaces lol.

@alexstojda alexstojda merged commit 20a599d into master Jun 20, 2023
@alexstojda alexstojda deleted the no-jira/various-improvements branch June 20, 2023 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants