MSP-5014 CheckGlobal to ApplyGlobalFlags

This commit is contained in:
Синельник Тимур Романович committed 2025-03-20 18:21:56 +03:00
1 parent ff2922cf1e
commit 0005f1ac0c
9 files changed
+39 -31

No files matched your search

+4 -3
View File
@@ -3,18 +3,19 @@ package command
import (
"encoding/json"
"github.com/urfave/cli/v2"
"ispctl/bash"
"ispctl/command/flag"
"ispctl/command/utils"
"ispctl/service"
"github.com/urfave/cli/v2"
)
func Get() *cli.Command {
return &cli.Command{
Name: "get",
Usage: "get configuration by module_name",
Before: flag.CheckGlobal,
Before: flag.ApplyGlobalFlags,
Action: get.action,
BashComplete: bash.Get(bash.ModuleName, bash.ModuleData).Complete,
}
@@ -25,7 +26,7 @@ var get getCommand
type getCommand struct{}
func (g getCommand) action(ctx *cli.Context) error {
if err := flag.CheckGlobal(ctx); err != nil {
if err := flag.ApplyGlobalFlags(ctx); err != nil {
return err
}
moduleName := ctx.Args().First()