Skip to content

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

Merged
pelletier merged 1 commit into
pelletier:v2from
daniel-weisse:fix/array-encoding/indentation
Apr 12, 2024
Merged

pelletier merged 1 commit into
pelletier:v2from
daniel-weisse:fix/array-encoding/indentation

Conversation

@daniel-weisse

Copy link
Copy Markdown
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
Copy Markdown
Owner

Thank you very much for the patch!

@pelletier
pelletier merged commit d00d2cc into pelletier:v2 Apr 12, 2024
@pelletier

Copy link
Copy Markdown
Owner

Released v2.2.1 with this fix.

jooola referenced this pull request in hetznercloud/cli 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
[https://github.com/pelletier/go-toml/pull/944](https://togithub.com/pelletier/go-toml/pull/944)

#### New Contributors

- [@&#8203;daniel-weisse](https://togithub.com/daniel-weisse) made their
first contribution in
[https://github.com/pelletier/go-toml/pull/944](https://togithub.com/pelletier/go-toml/pull/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>
@daniel-weisse
daniel-weisse deleted the fix/array-encoding/indentation branch July 16, 2024 10:31
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