Skip to content

refactor: use datatug/cliformat for --format flag#111

Merged
trakhimenok merged 2 commits into
mainfrom
feat/cliformat
Jun 27, 2026
Merged

refactor: use datatug/cliformat for --format flag#111
trakhimenok merged 2 commits into
mainfrom
feat/cliformat

Conversation

@trakhimenok

Copy link
Copy Markdown
Contributor

Summary

  • Removes the local addFormatFlag helper from flags.go — it registered a bare --format string flag with no validation.
  • Wires in github.com/datatug/cliformat: cliformat.AddFlag(cmd, "") registers the flag and cliformat.GetFormat(cmd) reads it in select.go.
  • describe.go, diff.go, and insert.go are untouched — they use PersistentFlags or project-specific format sets (ingr, csv, md) that cliformat doesn't cover.

Test plan

  • go build ./... passes
  • go test ./... passes (all 6 packages green)

🤖 Generated with Claude Code

inGitDB Dev and others added 2 commits June 27, 2026 08:22
Replaces local addFormatFlag helper with cliformat.AddFlag and
cliformat.GetFormat — centralises flag registration and format reading.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@trakhimenok trakhimenok merged commit ce1244c into main Jun 27, 2026
4 checks passed
@trakhimenok trakhimenok deleted the feat/cliformat branch June 27, 2026 07:30
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