Repository navigation
Migrate YAML library to goccy/go-yaml - #56
Conversation
Use Indent(4) on the YAML encoder and preserve TIMESTAMP wrapping for RFC3339 strings in param files; refresh output goldens. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Code Review
This pull request replaces the gopkg.in/yaml.v3 dependency with github.com/goccy/go-yaml, updating the YAML encoder configuration to use a 4-space indentation and modifying several golden test files accordingly. It also introduces logic to parse RFC3339Nano strings as TIMESTAMP literals. The review feedback highlights two main issues: first, unconditionally converting RFC3339-compliant strings to TIMESTAMP literals introduces a regression where users can no longer pass actual STRING parameters containing timestamps; second, the new yaml.Encoder implements io.Closer and should be properly closed in the caller to ensure buffered data is flushed.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Parse YAML param values via RawMessage so quoted RFC3339 strings stay STRING literals while unquoted timestamps become TIMESTAMP wrappers. Defer encoder Close in jq output paths. Co-authored-by: Cursor <cursoragent@cursor.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request replaces the gopkg.in/yaml.v3 dependency with github.com/goccy/go-yaml and updates the YAML encoder configuration to use a 4-space indent, which updates several golden test files. It also introduces proper encoder closing via a new Close method and closeEncoder helper, and refactors parameter loading to better handle quoted strings and timestamps in YAML files. Feedback suggests adding a defensive nil check to the Close method of stringPassThroughEncoderWrapper to prevent potential nil pointer dereferences.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary
gopkg.in/yaml.v3withgithub.com/goccy/go-yamlv1.19.2 for--param-fileparsing and--format=yamloutput.Test plan
go test ./...Made with Cursor