---
title: "github.com/pelletier/go-toml/v2 v2.4.3 Breaking Changes"
description: "What each github.com/pelletier/go-toml/v2 release removed, renamed or changed: 58 breaking changes in 4 versions on Go modules, each with its source."
canonical_url: https://since.dev/packages/go/github.com/pelletier/go-toml/v2
last_updated: 2026-12-04
---

# github.com/pelletier/go-toml/v2 breaking changes

github.com/pelletier/go-toml/v2 v2.4.3 (July 5, 2026) is its newest release with breaking changes. The first: Array and inline table nesting depth is now bounded in github.com/pelletier/go-toml/v2 v2.4.3. Every breaking API change we have recorded in github.com/pelletier/go-toml/v2 on Go modules: 58 breaking changes in 4 versions. Below, its 4 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `v2.4.3`, released July 5, 2026. [Source repository](https://github.com/pelletier/go-toml)

Packages on Go modules run on Go. [Go end of life dates](https://since.dev/calendar/go.md).

- From [v2.0.0](#v-v2-0-0) to [v2.4.3](#v-v2-4-3): 4 breaking changes in 2 versions.

## github.com/pelletier/go-toml/v2 v2.4.3 breaking changes

github.com/pelletier/go-toml/v2 v2.4.3, released July 5, 2026: 1 breaking change.

- **Behavior changed**  

Deeply nested arrays and inline tables are now limited in depth to prevent stack-overflow attacks, so input that was accepted before may now be rejected. Check that your TOML documents stay within reasonable nesting depth. [github.com](https://github.com/pelletier/go-toml/releases/tag/v2.4.3)

## github.com/pelletier/go-toml/v2 v2.3.0 breaking changes

github.com/pelletier/go-toml/v2 v2.3.0, released March 24, 2026: 3 breaking changes.

- **Renamed** `github.com/pelletier/go-toml/v2.Encoder.SetMarshalJsonNumbers`  

Use github.com/pelletier/go-toml/v2.Encoder.SetMarshalJSONNumbers instead. [pkg.go.dev](https://pkg.go.dev/github.com/pelletier/go-toml/v2@v2.3.0)
- **Behavior changed**  

Marshaled output now leaves quotes unescaped where they were previously escaped, so code that depends on the exact marshaled text may see different output. [github.com](https://github.com/pelletier/go-toml/releases/tag/v2.3.0)
- **Signature changed** `github.com/pelletier/go-toml/v2/unstable.Unmarshaler.UnmarshalTOML`  

Was func UnmarshalTOML(\*Node) error; now func UnmarshalTOML(\[\]byte) error. [pkg.go.dev](https://pkg.go.dev/github.com/pelletier/go-toml/v2@v2.3.0)

## github.com/pelletier/go-toml/v2 v2.0.0 breaking changes

github.com/pelletier/go-toml/v2 v2.0.0, released April 28, 2022: 52 breaking changes.

- **Removed**  

The sort-of-AST that v1 provided for manipulating and writing back documents was removed; v2 only exposes an internal intermediate AST. [github.com](https://github.com/pelletier/go-toml/releases/tag/v2.0.0)
- **Removed** `github.com/pelletier/go-toml/v2.Decoder.SetTagName`  

github.com/pelletier/go-toml/v2.Decoder.SetTagName was removed in github.com/pelletier/go-toml/v2 v2.0.0 [pkg.go.dev](https://pkg.go.dev/github.com/pelletier/go-toml/v2@v2.0.0)
- **Removed** `github.com/pelletier/go-toml/v2.Decoder.Strict`  

github.com/pelletier/go-toml/v2.Decoder.Strict was removed in github.com/pelletier/go-toml/v2 v2.0.0 [pkg.go.dev](https://pkg.go.dev/github.com/pelletier/go-toml/v2@v2.0.0)
- **Removed** `github.com/pelletier/go-toml/v2.Encoder.ArraysWithOneElementPerLine`  

github.com/pelletier/go-toml/v2.Encoder.ArraysWithOneElementPerLine was removed in github.com/pelletier/go-toml/v2 v2.0.0 [pkg.go.dev](https://pkg.go.dev/github.com/pelletier/go-toml/v2@v2.0.0)
- **Removed** `github.com/pelletier/go-toml/v2.Encoder.CompactComments`  

github.com/pelletier/go-toml/v2.Encoder.CompactComments was removed in github.com/pelletier/go-toml/v2 v2.0.0 [pkg.go.dev](https://pkg.go.dev/github.com/pelletier/go-toml/v2@v2.0.0)
- **Removed** `github.com/pelletier/go-toml/v2.Encoder.Indentation`  

github.com/pelletier/go-toml/v2.Encoder.Indentation was removed in github.com/pelletier/go-toml/v2 v2.0.0 [pkg.go.dev](https://pkg.go.dev/github.com/pelletier/go-toml/v2@v2.0.0)
- **Removed** `github.com/pelletier/go-toml/v2.Encoder.Order`  

github.com/pelletier/go-toml/v2.Encoder.Order was removed in github.com/pelletier/go-toml/v2 v2.0.0 [pkg.go.dev](https://pkg.go.dev/github.com/pelletier/go-toml/v2@v2.0.0)
- **Removed** `github.com/pelletier/go-toml/v2.Encoder.PromoteAnonymous`  

github.com/pelletier/go-toml/v2.Encoder.PromoteAnonymous was removed in github.com/pelletier/go-toml/v2 v2.0.0 [pkg.go.dev](https://pkg.go.dev/github.com/pelletier/go-toml/v2@v2.0.0)
- **Removed** `github.com/pelletier/go-toml/v2.Encoder.QuoteMapKeys`  

github.com/pelletier/go-toml/v2.Encoder.QuoteMapKeys was removed in github.com/pelletier/go-toml/v2 v2.0.0 [pkg.go.dev](https://pkg.go.dev/github.com/pelletier/go-toml/v2@v2.0.0)
- **Removed** `github.com/pelletier/go-toml/v2.Encoder.SetTagComment`  

github.com/pelletier/go-toml/v2.Encoder.SetTagComment was removed in github.com/pelletier/go-toml/v2 v2.0.0 [pkg.go.dev](https://pkg.go.dev/github.com/pelletier/go-toml/v2@v2.0.0)

And 42 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## github.com/pelletier/go-toml/v2 v2.0.0-beta.6 breaking changes

github.com/pelletier/go-toml/v2 v2.0.0-beta.6, released April 28, 2022: 2 breaking changes.

- **Removed** `github.com/pelletier/go-toml/v2/query`  

The go-toml/query package is no longer part of the project. Code importing it must be changed to another approach. [pkg.go.dev](https://pkg.go.dev/github.com/pelletier/go-toml/v2@v2.0.0)
- **Renamed** `Decoder.SetStrict`  

Decoder.SetStrict was renamed to Decoder.DisallowUnknownFields. Update calls to use the new name. [github.com](https://github.com/pelletier/go-toml/releases/tag/v2.0.0-beta.6)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
