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
On this page
Latest version v2.4.3, released July 5, 2026. Source repository
Packages on Go modules run on Go. Go end of life dates.
github.com/pelletier/go-toml/v2 v2.4.3 breaking changes
- 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
github.com/pelletier/go-toml/v2 v2.3.0 breaking changes
- Renamed
github.com/pelletier/go-toml/v2.Encoder.SetMarshalJsonNumbers
Use github.com/pelletier/go-toml/v2.Encoder.SetMarshalJSONNumbers instead. pkg.go.dev - 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 - Signature changed
github.com/pelletier/go-toml/v2/unstable.Unmarshaler.UnmarshalTOML
Was func UnmarshalTOML(*Node) error; now func UnmarshalTOML([]byte) error. pkg.go.dev
github.com/pelletier/go-toml/v2 v2.0.0 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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
And 42 more in this version. Sign up to see every change
github.com/pelletier/go-toml/v2 v2.0.0-beta.6 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 - Renamed
Decoder.SetStrict
Decoder.SetStrict was renamed to Decoder.DisallowUnknownFields. Update calls to use the new name. github.com
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The 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.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.