Skip to content

Comments

upgrade to pelletier/go-toml v2 (closes #648 #124)#674

Merged
nocive merged 1 commit intomainfrom
648
Nov 20, 2025
Merged

upgrade to pelletier/go-toml v2 (closes #648 #124)#674
nocive merged 1 commit intomainfrom
648

Conversation

@nocive
Copy link
Contributor

@nocive nocive commented Nov 20, 2025

closes #648 & #124

@gemini-code-assist
Copy link

Summary of Changes

Hello @nocive, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a significant dependency upgrade, moving the project from pelletier/go-toml v1 to v2. This upgrade necessitated changes to module import paths across several configuration-related files and adaptations to the go-toml library's Encoder API. The vendored code has been completely refreshed to reflect the new major version.

Highlights

  • Dependency Upgrade: The github.com/pelletier/go-toml library has been upgraded from version v1.9.5 to v2.2.4. This is a major version upgrade, indicating significant changes and potential breaking API modifications.
  • Module Path Update: All import statements referencing github.com/pelletier/go-toml have been updated to github.com/pelletier/go-toml/v2 to reflect the new major version's module path.
  • API Adaptations: Existing code interacting with the go-toml library's Encoder has been updated to align with the new API in v2. Specifically, Encoder.ArraysWithOneElementPerLine was replaced by Encoder.SetArraysMultiline, and Encoder.Order(toml.OrderPreserve) and Encoder.SetTagCommented("false") calls were removed due to API changes in the new version.
  • Vendored Code Replacement: The entire vendored directory for github.com/pelletier/go-toml (v1) has been removed and replaced with the new v2 version, including all its internal files, documentation, and build scripts.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@nocive nocive changed the title upgrade to pelletier/go-toml v2 upgrade to pelletier/go-toml v2 (closes #648) Nov 20, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the pelletier/go-toml dependency from version 1 to version 2. The changes include updating the go.mod and go.sum files, changing import paths across several files in the pkg/cfg package, and adapting the code to the new API of go-toml/v2. Specifically, encoder option setting methods have been updated. The vendored dependency has also been updated accordingly. The changes are straightforward and correctly implement the upgrade. I've reviewed the API changes and they seem correct. The pull request looks good to merge.

@nocive nocive changed the title upgrade to pelletier/go-toml v2 (closes #648) upgrade to pelletier/go-toml v2 (closes #648 #124) Nov 20, 2025
@nocive nocive merged commit f2dbeb1 into main Nov 20, 2025
6 checks passed
@nocive nocive deleted the 648 branch November 20, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

upgrade to pelletier/go-toml v2

1 participant