8000 Use the selected input and output streams for --values by rupayon123 · Pull Request #134 · tomnomnom/gron · GitHub
[go: up one dir, main page]

Skip to content

Use the selected input and output streams for --values - #134

Open
rupayon123 wants to merge 1 commit into
tomnomnom:masterfrom
rupayon123:fix/values-action-streams
Open

rupayon123 wants to merge 1 commit into
tomnomnom:masterfrom
rupayon123:fix/values-action-streams

Conversation

@rupayon123
Copy link
Copy Markdown

gron --values file.gron currently ignores the selected file: gronValues scans os.Stdin and writes directly to os.Stdout rather than using the reader/writer passed by the CLI. With a file containing json.name = "file value"; and a different stdin value, the command prints the stdin value.

Use the supplied reader and writer, matching the other actions. Regression cases cover mixed scalars, ignored container assignments, decoded Unicode/escaped strings, a root scalar and empty input. The actual CLI now reads the file correctly; implicit stdin and explicit - still work.

Validation on Go 1.26.0 / macOS arm64:

  • New regression: three nonempty cases failed before and pass after.
  • ./script/test, go test -race ./... -count=1 -timeout=120s, go vet ./..., gofmt and diff check passed.
  • Ran the actual ./script/lint using a recovered, isolated gometalinter v3.0.0 toolchain. It exits 1 with two existing golint naming warnings in unchanged url_test.go (envHttpProxy at line 32 and envHttpsProxy at line 79). An untouched copy of the base produces byte-identical diagnostics; this patch adds none. The full lint result is not green.

Linux/Windows, the release Go matrix and actual URL input were not tested locally. This changes stream routing only; it does not address the separate BOM or malformed-input reports.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0