kubesaw / ksctl

ksctl is a command-line tool to manage your installation of KubeSaw
Apache License 2.0
4 stars 11 forks source link

refactor: logging and prompting #85

Open xcoulon opened 1 month ago

xcoulon commented 1 month ago

using https://github.com/charmbracelet/log and https://github.com/charmbracelet/huh also, reword a few messages output in the console

Signed-off-by: Xavier Coulon xcoulon@redhat.com

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 60.42781% with 148 lines in your changes missing coverage. Please review.

Project coverage is 65.75%. Comparing base (8d63298) to head (e6d00c3).

Files with missing lines Patch % Lines
pkg/ioutils/terminal.go 0.00% 69 Missing :warning:
pkg/cmd/adm/restart.go 61.53% 6 Missing and 4 partials :warning:
pkg/client/client.go 62.50% 7 Missing and 2 partials :warning:
pkg/cmd/adm/install_operator.go 75.00% 2 Missing and 7 partials :warning:
pkg/cmd/adm/must_gather_namespace.go 53.33% 6 Missing and 1 partial :warning:
pkg/cmd/retarget.go 61.53% 3 Missing and 2 partials :warning:
pkg/cmd/ban.go 71.42% 2 Missing and 2 partials :warning:
pkg/configuration/configuration.go 60.00% 4 Missing :warning:
pkg/cmd/adm/register_member.go 90.00% 2 Missing and 1 partial :warning:
pkg/cmd/add_space_users.go 77.77% 1 Missing and 1 partial :warning:
... and 15 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #85 +/- ## ========================================== - Coverage 68.00% 65.75% -2.25% ========================================== Files 44 44 Lines 3175 3119 -56 ========================================== - Hits 2159 2051 -108 - Misses 825 878 +53 + Partials 191 190 -1 ``` | [Files with missing lines](https://app.codecov.io/gh/kubesaw/ksctl/pull/85?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw) | Coverage Δ | | |---|---|---| | [pkg/cmd/base\_kubectl.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/85?src=pr&el=tree&filepath=pkg%2Fcmd%2Fbase_kubectl.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9iYXNlX2t1YmVjdGwuZ28=) | `87.75% <100.00%> (ø)` | | | [pkg/cmd/generate/cluster.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/85?src=pr&el=tree&filepath=pkg%2Fcmd%2Fgenerate%2Fcluster.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9nZW5lcmF0ZS9jbHVzdGVyLmdv) | `76.31% <100.00%> (-0.61%)` | :arrow_down: | | [pkg/context/command\_context.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/85?src=pr&el=tree&filepath=pkg%2Fcontext%2Fcommand_context.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NvbnRleHQvY29tbWFuZF9jb250ZXh0Lmdv) | `0.00% <ø> (-54.55%)` | :arrow_down: | | [pkg/cmd/generate/admin-manifests.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/85?src=pr&el=tree&filepath=pkg%2Fcmd%2Fgenerate%2Fadmin-manifests.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9nZW5lcmF0ZS9hZG1pbi1tYW5pZmVzdHMuZ28=) | `47.67% <66.66%> (ø)` | | | [pkg/cmd/generate/cli\_configs.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/85?src=pr&el=tree&filepath=pkg%2Fcmd%2Fgenerate%2Fcli_configs.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9nZW5lcmF0ZS9jbGlfY29uZmlncy5nbw==) | `73.62% <91.66%> (ø)` | | | [pkg/cmd/generate/nstemplatetiers.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/85?src=pr&el=tree&filepath=pkg%2Fcmd%2Fgenerate%2Fnstemplatetiers.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9nZW5lcmF0ZS9uc3RlbXBsYXRldGllcnMuZ28=) | `53.03% <75.00%> (-0.71%)` | :arrow_down: | | [pkg/cmd/status.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/85?src=pr&el=tree&filepath=pkg%2Fcmd%2Fstatus.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9zdGF0dXMuZ28=) | `79.48% <80.00%> (ø)` | | | [pkg/cmd/add\_space\_users.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/85?src=pr&el=tree&filepath=pkg%2Fcmd%2Fadd_space_users.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9hZGRfc3BhY2VfdXNlcnMuZ28=) | `72.72% <77.77%> (-0.70%)` | :arrow_down: | | [pkg/cmd/adm/unregister\_member.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/85?src=pr&el=tree&filepath=pkg%2Fcmd%2Fadm%2Funregister_member.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9hZG0vdW5yZWdpc3Rlcl9tZW1iZXIuZ28=) | `55.55% <80.00%> (+1.01%)` | :arrow_up: | | [pkg/cmd/approve.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/85?src=pr&el=tree&filepath=pkg%2Fcmd%2Fapprove.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9hcHByb3ZlLmdv) | `69.89% <71.42%> (ø)` | | | ... and [18 more](https://app.codecov.io/gh/kubesaw/ksctl/pull/85?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw) | |