CXH-1889: replace WriteString(fmt.Sprintf) with fmt.Fprintf and add nil guard - #26
Conversation
Fixes revive unhandled-error lint failures and a nil pointer dereference when c.client is nil before IsVersion8() is called. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
These files are required by the Generate Baton Metadata CI workflow to validate that committed metadata matches the binary output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Required by the Generate Baton Metadata CI workflow — the docs freshness check requires docs/connector.mdx to be present and updated whenever baton_capabilities.json changes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Connector PR Review: CXH-1889: replace WriteString(fmt.Sprintf) with fmt.Fprintf and add nil guardBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review SummaryThe full PR diff was scanned for security and correctness. The new commit only refined docs/connector.mdx to show a comma-separated example and to describe BATON_EXPAND_COLUMNS as a comma-separated list, matching the stringSliceField config. The underlying code changes (sb.WriteString(fmt.Sprintf) becoming fmt.Fprintf in pkg/client/client.go, and the c.client != nil guard in pkg/connector/connector.go) are semantically equivalent and correct: the string verb still treats values as literal arguments, and the nil guard is a safe defensive check. No new issues found. Security IssuesNone found. Correctness IssuesNone found. SuggestionsNone. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
expand-columns is a string slice like skip-database; show a comma-separated example and note it in the description. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
sb.WriteString(fmt.Sprintf(...))calls withfmt.Fprintf(&sb, ...)inclient.goandclient_test.goto fixreviveunhandled-error lint failuresc.client != nilguard inconnector.gobefore callingIsVersion8()to prevent a nil pointer dereferenceTest plan
golangci-lint run ./...reports 0 issuesgo build ./...succeedsgo test ./...passes (7 tests)🤖 Generated with Claude Code