feat(sheets): add read-format command and borders guardrails#284
Merged
steipete merged 3 commits intosteipete:mainfrom Mar 8, 2026
Merged
Conversation
ea8662c to
57ff818
Compare
Owner
|
Landed after manual rebase/conflict resolution onto main.
Thanks @nilzzzzzz! |
klodr
pushed a commit
to klodr/gogcli
that referenced
this pull request
Apr 22, 2026
…e#284) * feat(sheets): add read-format and harden borders formatting * style(sheets): satisfy format check on landed branch (steipete#284) * refactor(sheets): satisfy read-format lint on landed branch (steipete#284) --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Hi @steipete,
follow-up to #72.
This PR adds Sheets format readback and tightens formatting safety around border typos.
Also includes a tiny contacts compile fix (2 signature type corrections) to unblock CI/build on current
main.What this PR changes
gog sheets read-format(aliases:get-format,format-read).--effectivemode forread-format.gog sheets formatinput validation forboarderstypo and unknown JSON keys.go build/ CI pass.Command behavior (clear contract)
gog sheets read-format <spreadsheetId> <range>userEnteredFormat) for every formatted cell in range.spreadsheetIdrangesource(userEnteredFormat)formats[]withsheet,a1,row,col,value,formatA1,VALUE,FORMAT(format serialized as JSON)gog sheets read-format <spreadsheetId> <range> --effectiveeffectiveFormat) instead of user-entered format.gog sheets format ... --format-json ... --format-fields ...(existing command improved)--format-jsonnow uses strict decode (DisallowUnknownFields) so unknown keys fail early.--format-fieldsnow detectsboarderstypo and returns explicit guidance to useborders.Why the contacts fix is in this PR
Current
mainhas a compile break ininternal/cmd/contacts_crud.godue mismatched helper argument types.Without fixing that, CI fails before Sheets tests run.
This PR applies the minimal 2-line signature correction only to unblock build.
Prompt history (verbatim-ish)
How has this been tested?
go build ./cmd/goggo test ./internal/cmd -run 'TestSheetsReadFormatCmd|TestSheetsFormatCmd_BordersTopStyle|TestApplyForceSendFields_BordersTopStyle|TestHasBoardersTypo|TestSheetsFormat_ValidationErrors|TestExecute_SheetsMoreCommands|TestContacts(Create|Update)' -count=11T2R_IXqmrSz1rGOj1ERq7U7TM2v3wZ_2rOsgcYA8jAQgid=1911010233):Original Plangog sheets read-format ... --json