Skip to content

Add unit tests for CLI #123

@zipdoki

Description

@zipdoki

Background

The CLI was originally written in Kotlin, then converted to Go for easier distribution. We used AI for the conversion. It works, but honestly, we are not confident in Go—we do not know if the code is idiomatic or follows best practices.

We need help from Go developers. If you see something wrong or weird, please tell us.

The `internal/util` package has only one test file (`truncate_test.go`), which was also written by AI.

Tasks

Each item can be submitted as a separate PR.

  • `util/filters.go` (12 LOC, Easy)
  • `util/formatter.go` (~50 LOC, Easy)
  • `util/strings.go` (~30 LOC, Easy)
  • `util/arguments.go` (110 LOC, Medium)
  • `util/table_printer.go` (~80 LOC, Medium)

How to Contribute

  1. Comment below to claim an item
  2. Branch: `test/cli-util-`
  3. PR title: `test(cli): add tests for util/`
  4. One file per PR
  5. Run `cd cli && make test`

Done When

  • Test file at `cli/internal/util/_test.go`
  • Public functions covered
  • Tests pass

Notes

Code improvements are welcome—open a separate issue or include in your PR."
Create CLI util tests umbrella issue

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomershelp wantedCommunity contributions are welcomescope:cliCommand-line interface (Go)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions