refactor!: spf13/cobra migrate #452

Merged
decentral1se merged 1 commits from cobra-migrate-again into main 2024-12-27 12:37:29 +00:00
Owner

Drunk zombie continuation of coop-cloud/abra#443 with cobra.

Building the new CLI in the shell of the old.

  • migrate to spf13/cobra
  • fix -- handling, support flexible arg/flag handling
  • compatible sub-command name to autocompletion
  • docstring handling of flags ("--double/-single" & quotes)
  • manpages (abra man)
  • decomissioning internal/cli.go as much as possible
  • <domain> -> <app> in docstrings
  • ValidateX2 -> ValidateX
  • consisent use of <>/[] in docstrings
  • ensure validation is wired up correctly (+ len(args))
  • completion for arguments (also, flags this time!)
  • custom error handler to use slog/log machinery (not possible yet)

Closes

🔥🔥🔥 Breaking changes 🔥🔥🔥

Drunk zombie continuation of https://git.coopcloud.tech/coop-cloud/abra/pulls/443 with [cobra](https://cobra.dev). Building the new CLI in the shell of the old. - [x] migrate to `spf13/cobra` - [x] fix `--` handling, support flexible arg/flag handling - [x] compatible sub-command name to autocompletion - [x] docstring handling of flags ("--double/-single" & quotes) - [x] manpages (`abra man`) - [x] decomissioning `internal/cli.go` as much as possible - [x] `<domain>` -> `<app>` in docstrings - [x] `ValidateX2` -> `ValidateX` - [x] consisent use of `<>/[]` in docstrings - [x] ensure [validation](https://cobra.dev/#positional-and-custom-arguments) is wired up correctly (+ `len(args)`) - [x] completion for arguments (also, flags this time!) - [x] ~~custom error handler to use `slog`/`log` machinery~~ ([not possible yet](https://github.com/spf13/cobra/pull/2199)) ## Closes - https://git.coopcloud.tech/toolshed/organising/issues/653 - https://git.coopcloud.tech/toolshed/organising/issues/645 - https://git.coopcloud.tech/toolshed/organising/issues/590 ## 🔥🔥🔥 Breaking changes 🔥🔥🔥 - `ge`/`gn` -> `e/N` on `recipe new` ([`cobra` ticket](https://github.com/spf13/cobra/issues/2208))
decentral1se added 1 commit 2024-12-21 19:48:39 +00:00
wip: another cobra migrate attempt
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
9dbf361541
decentral1se force-pushed cobra-migrate-again from 9dbf361541 to b052f355db 2024-12-22 13:31:04 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from b052f355db to b627780583 2024-12-22 13:54:47 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from b627780583 to 2360dd0670 2024-12-22 23:11:49 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from 2360dd0670 to e0a8030c35 2024-12-23 11:49:40 +00:00 Compare
decentral1se changed title from WIP: another cobra migrate attempt to WIP: `spf13/cobra` migration 2024-12-23 18:14:34 +00:00
decentral1se force-pushed cobra-migrate-again from e0a8030c35 to 8fafa7506a 2024-12-23 18:26:20 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from 8fafa7506a to 6508d0ff54 2024-12-23 18:26:54 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from 6508d0ff54 to a20269c6a4 2024-12-25 09:49:29 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from a20269c6a4 to 2fe875c7a5 2024-12-25 12:02:36 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from 2fe875c7a5 to 6e772afa8c 2024-12-26 09:52:51 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from 6e772afa8c to 7a6da0a662 2024-12-26 16:54:35 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from 7a6da0a662 to 56e2624e8b 2024-12-26 17:11:01 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from 56e2624e8b to 974af7fadd 2024-12-26 18:39:33 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from 974af7fadd to 800e94fe81 2024-12-26 19:22:47 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from 800e94fe81 to d0764a03b9 2024-12-27 11:05:21 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from d0764a03b9 to 06966a75cf 2024-12-27 11:10:18 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from 06966a75cf to 7f6c6ac71f 2024-12-27 11:32:38 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from 7f6c6ac71f to db1381acd1 2024-12-27 11:49:06 +00:00 Compare
decentral1se force-pushed cobra-migrate-again from db1381acd1 to 671e1ca276 2024-12-27 12:32:47 +00:00 Compare
decentral1se changed title from WIP: `spf13/cobra` migration to refactor!: `spf13/cobra` migrate 2024-12-27 12:32:58 +00:00
decentral1se merged commit 671e1ca276 into main 2024-12-27 12:37:29 +00:00
decentral1se deleted branch cobra-migrate-again 2024-12-27 12:37:29 +00:00
Sign in to join this conversation.
No description provided.