posit-dev / posit-dev/ptd

consider refactoring k9s command to import and build k9s rather than shelling out to external binary

Open
#41 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
7
Forks
2
Avg merge
1d 15h
Merged PRs (30d)
3

Description

From @stevenolen code review on rstudio/ptd#2146

k9s actually uses cobra, so we could maybe we could import it and subcommand it rather than shelling out.

Thinking about this, we might need to cross-compile for windows, would including k9s make that build harder? Looking at https://github.com/derailed/k9s, they ship binaries for windows so thats probably fine.

Love the idea of making the ptd cli more standalone with less manual installation of external tools.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the ptd CLI command that currently shells out to k9s, then read k9s's cmd/root.go to understand its Cobra entry point. Assess whether importing and building k9s preserves the CLI behavior and whether cross-compiling for Windows still works. Done means a standalone ptd build no longer requires a separately installed k9s binary.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.