Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pelletier/go-toml
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.3.0
Choose a base ref
...
head repository: pelletier/go-toml
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.3.1
Choose a head ref
  • 3 commits
  • 6 files changed
  • 4 contributors

Commits on Apr 16, 2026

  1. Fix incorrect error positions in unstable parser Range() (#1047) (#1056)

    Parser.subsliceOffset() assumed its input was always a suffix of the
    document, computing offset as len(data)-len(b). Error highlights from
    NewParserError are arbitrary subslices (e.g. b[0:1]), not suffixes,
    causing wrong offsets after comments and other consumed content.
    
    Replace the suffix-length calculation with reflect-based pointer
    arithmetic, matching the safe approach already used in errors.go.
    
    ---------
    
    Co-authored-by: Claude <[email protected]>
    pelletier and claude authored Apr 16, 2026
    Configuration menu
    Copy the full SHA
    c171216 View commit details
    Browse the repository at this point in the history
  2. fix: change DisallowUnknownFields error from "missing field" to "unkn…

    …own field" (#1054)
    
    The diagnostic message for DisallowUnknownFields said "missing field",
    which reads as if the TOML is missing something required. From the
    user's perspective, the field is unknown to the target struct.
    
    Change the message to "unknown field" for consistency with the
    DisallowUnknownFields API name and to reduce confusion.
    
    Fixes #1049
    Yanhu007 authored Apr 16, 2026
    Configuration menu
    Copy the full SHA
    45d4fb4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f85c4e8 View commit details
    Browse the repository at this point in the history
Loading