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

Encode: fix indentation when marshalling slices as array tables #944

Merged

Conversation

daniel-weisse
Copy link
Contributor

Arrays of custom types are not indented due to a missing call to enc.indent.
This PR fixes the issue by adding the missing call when enc.indentTables == true


Fixes #943

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
@pelletier pelletier added the bug Issues describing a bug in go-toml. label Apr 12, 2024
@pelletier pelletier changed the title Fix indentation when marshalling custom type arrays Encode: fix indentation when marshalling custom type arrays Apr 12, 2024
@pelletier pelletier changed the title Encode: fix indentation when marshalling custom type arrays Encode: fix indentation when marshalling slices as array tables Apr 12, 2024
@pelletier
Copy link
Owner

Thank you very much for the patch!

@pelletier pelletier merged commit d00d2cc into pelletier:v2 Apr 12, 2024
11 checks passed
@pelletier
Copy link
Owner

Released v2.2.1 with this fix.

jooola pushed a commit to hetznercloud/cli that referenced this pull request Apr 17, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/pelletier/go-toml/v2](https://togithub.com/pelletier/go-toml)
| `v2.2.0` -> `v2.2.1` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fpelletier%2fgo-toml%2fv2/v2.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fpelletier%2fgo-toml%2fv2/v2.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fpelletier%2fgo-toml%2fv2/v2.2.0/v2.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fpelletier%2fgo-toml%2fv2/v2.2.0/v2.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pelletier/go-toml (github.com/pelletier/go-toml/v2)</summary>

###
[`v2.2.1`](https://togithub.com/pelletier/go-toml/releases/tag/v2.2.1)

[Compare
Source](https://togithub.com/pelletier/go-toml/compare/v2.2.0...v2.2.1)

<!-- Release notes generated using configuration in .github/release.yml
at v2.2.1 -->

#### What's Changed

##### Fixed bugs

- Encode: fix indentation when marshalling slices as array tables by
[@&#8203;daniel-weisse](https://togithub.com/daniel-weisse) in
[pelletier/go-toml#944

#### New Contributors

- [@&#8203;daniel-weisse](https://togithub.com/daniel-weisse) made their
first contribution in
[pelletier/go-toml#944

**Full Changelog**:
pelletier/go-toml@v2.2.0...v2.2.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/hetznercloud/cli).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues describing a bug in go-toml.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect indentation for arrays of custom types
2 participants