refactor: urfave v3

This commit is contained in:
2024-07-09 13:57:54 +02:00
parent 16aeb441e7
commit ca37621ce3
46 changed files with 405 additions and 345 deletions

View File

@ -4,13 +4,13 @@ import (
"os"
"coopcloud.tech/abra/pkg/log"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
// ShowSubcommandHelpAndError exits the program on error, logs the error to the
// terminal, and shows the help command.
func ShowSubcommandHelpAndError(c *cli.Context, err interface{}) {
if err2 := cli.ShowSubcommandHelp(c); err2 != nil {
func ShowSubcommandHelpAndError(cmd *cli.Command, err interface{}) {
if err2 := cli.ShowSubcommandHelp(cmd); err2 != nil {
log.Error(err2)
}
log.Error(err)