Bump github.com/BurntSushi/toml from 0.4.1 to 1.0.0 #45

Merged
dependabot[bot] merged 1 commits from dependabot/go_modules/github.com/BurntSushi/toml-1.0.0 into master 2022-01-20 01:13:30 +03:00
dependabot[bot] commented 2022-01-12 21:16:18 +03:00 (Migrated from github.com)

Bumps github.com/BurntSushi/toml from 0.4.1 to 1.0.0.

Release notes

Sourced from github.com/BurntSushi/toml's releases.

v1.0.0

This release adds much more detailed errors, support for the toml.Marshaler interface, and several fixes.

There is no special meaning in the jump to v1.0; the 0.x releases were always treated as if they're 1.x with regards to compatibility; the versioning scheme for this library predates the release of modules.

New features

  • Error reporting is much improved; the reported position of errors should now always be correct and the library can print more detailed errors (#299, #332)

    Decode always return a toml.ParseError, which has three methods:

    • Error() behaves as before and shows a single concise line with the error.

    • ErrorWithLocation() shows the same error, but also shows the line the error occurred at, similar to e.g. clang or the Rust compiler.

    • ErrorWithUsage() is the same as ErrorWithPosition(), but may also show a longer usage guidance message. This isn't always present (in which case it behaves identical to ErrorWithPosition()), but it should be present for most common mistakes and sources of confusion.

    Which error the correct one to use is depends on your application and preferences; in general I would recommend using at least ErrorWithPosition() for user-facing errors, as it's much more helpful for users of any skill level. If your users are likely to be non-technical then ErrorWithUsage() is probably a good idea; I did my best to avoid technical jargon such as "newline" and phrase things in a way that's understandable by most people not intimately familiar with these sort of things.

    Additionally, the TOML key that fialed should now always be reported in all errors.

  • Add toml.Marshaler interface. This can be used if you want full control over how something is marshalled as TOML, similar to json.Marshaler etc. This takes precedence over encoding.TextMarshaler. (#327)

  • Allow TOML integers to be decoded to a Go float (#325)

    Previously int = 42 could only be decoded to an int* type; now this can also be decoded in a float type as long as it can be represented without loss of data.

Fixes

  • Key.String() is now quoted when needed (#333)

  • Fix decoding of nested structs on 32bit platforms (#314)

  • Empty slices are now always []T{} rather than nil, which was the behaviour in v0.3.1 and before. While they are identical for most purposes, encoding/json encodes them different ([] vs. null), making it an (accidentally) incompatible change (#339)

Commits
  • 4272474 Reject control characters everywhere
  • 9bbaaec Update toml-test
  • 8a54f3e Merge TestDecodeInterfaceSlice in TestDecodeSlices
  • 9515b92 Decode S=[] into a non-nil []interface{}. (#339)
  • 7d0236f Make sure quoted keys with dots work well (#333)
  • ff0a3f8 Add back build tags for toml-test files
  • 7356d5f Few staticcheck fixes
  • b1471ff Don't allow "0_0"
  • 847ee8a Update toml-test
  • 4619257 Clearer errors when decoding to invalid types (#332)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml) from 0.4.1 to 1.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/BurntSushi/toml/releases">github.com/BurntSushi/toml's releases</a>.</em></p> <blockquote> <h2>v1.0.0</h2> <p>This release adds much more detailed errors, support for the <code>toml.Marshaler</code> interface, and several fixes.</p> <p>There is no special meaning in the jump to v1.0; the 0.x releases were always treated as if they're 1.x with regards to compatibility; the versioning scheme for this library predates the release of modules.</p> <h2>New features</h2> <ul> <li> <p>Error reporting is much improved; the reported position of errors should now always be correct and the library can print more detailed errors (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/299">#299</a>, <a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/332">#332</a>)</p> <p>Decode always return a <code>toml.ParseError</code>, which has three methods:</p> <ul> <li> <p><code>Error()</code> behaves as before and shows a single concise line with the error.</p> </li> <li> <p><code>ErrorWithLocation()</code> shows the same error, but also shows the line the error occurred at, similar to e.g. clang or the Rust compiler.</p> </li> <li> <p><code>ErrorWithUsage()</code> is the same as <code>ErrorWithPosition()</code>, but may also show a longer usage guidance message. This isn't always present (in which case it behaves identical to <code>ErrorWithPosition()</code>), but it should be present for most common mistakes and sources of confusion.</p> </li> </ul> <p>Which error the correct one to use is depends on your application and preferences; in general I would recommend using at least <code>ErrorWithPosition()</code> for user-facing errors, as it's much more helpful for users of any skill level. If your users are likely to be non-technical then <code>ErrorWithUsage()</code> is probably a good idea; I did my best to avoid technical jargon such as &quot;newline&quot; and phrase things in a way that's understandable by most people not intimately familiar with these sort of things.</p> <p>Additionally, the TOML key that fialed should now always be reported in all errors.</p> </li> <li> <p>Add <code>toml.Marshaler</code> interface. This can be used if you want full control over how something is marshalled as TOML, similar to <code>json.Marshaler</code> etc. This takes precedence over <code>encoding.TextMarshaler</code>. (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/327">#327</a>)</p> </li> <li> <p>Allow TOML integers to be decoded to a Go float (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/325">#325</a>)</p> <p>Previously <code>int = 42</code> could only be decoded to an <code>int*</code> type; now this can also be decoded in a <code>float</code> type as long as it can be represented without loss of data.</p> </li> </ul> <h2>Fixes</h2> <ul> <li> <p>Key.String() is now quoted when needed (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/333">#333</a>)</p> </li> <li> <p>Fix decoding of nested structs on 32bit platforms (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/314">#314</a>)</p> </li> <li> <p>Empty slices are now always <code>[]T{}</code> rather than nil, which was the behaviour in v0.3.1 and before. While they are identical for most purposes, encoding/json encodes them different (<code>[]</code> vs. <code>null</code>), making it an (accidentally) incompatible change (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/339">#339</a>)</p> </li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/BurntSushi/toml/commit/4272474656f1b35414cdee32185a45e36b39246e"><code>4272474</code></a> Reject control characters everywhere</li> <li><a href="https://github.com/BurntSushi/toml/commit/9bbaaec997900f53eebd078adb4f041f7f45f5ef"><code>9bbaaec</code></a> Update toml-test</li> <li><a href="https://github.com/BurntSushi/toml/commit/8a54f3e8df7eea389c18e58707d6215333f1e47e"><code>8a54f3e</code></a> Merge TestDecodeInterfaceSlice in TestDecodeSlices</li> <li><a href="https://github.com/BurntSushi/toml/commit/9515b929790931bfe0e72976a031c3a5f0e4c664"><code>9515b92</code></a> Decode S=[] into a non-nil []interface{}. (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/339">#339</a>)</li> <li><a href="https://github.com/BurntSushi/toml/commit/7d0236fe74765a731cf768bea23b9132b8c2b9e0"><code>7d0236f</code></a> Make sure quoted keys with dots work well (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/333">#333</a>)</li> <li><a href="https://github.com/BurntSushi/toml/commit/ff0a3f89c20b18b5a8637bc3526e5abc0bce25e1"><code>ff0a3f8</code></a> Add back build tags for toml-test files</li> <li><a href="https://github.com/BurntSushi/toml/commit/7356d5f88875523b62c873d04211212bcf03553b"><code>7356d5f</code></a> Few staticcheck fixes</li> <li><a href="https://github.com/BurntSushi/toml/commit/b1471ff6cfa7e6d80627cbae2eefcb7ecec96c99"><code>b1471ff</code></a> Don't allow &quot;0_0&quot;</li> <li><a href="https://github.com/BurntSushi/toml/commit/847ee8a07aeacf66cbe16c51cde1dfed0d81fcf1"><code>847ee8a</code></a> Update toml-test</li> <li><a href="https://github.com/BurntSushi/toml/commit/461925704ed4d72ccc1fd51fe69bb3ac47091330"><code>4619257</code></a> Clearer errors when decoding to invalid types (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/332">#332</a>)</li> <li>Additional commits viewable in <a href="https://github.com/BurntSushi/toml/compare/v0.4.1...v1.0.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/BurntSushi/toml&package-manager=go_modules&previous-version=0.4.1&new-version=1.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
vtolstov (Migrated from github.com) reviewed 2022-01-12 21:16:37 +03:00
vtolstov (Migrated from github.com) approved these changes 2022-01-19 21:20:47 +03:00
Sign in to join this conversation.
No description provided.