From 46b815c863a284af8e851f7b3f3cd1062116a97d Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 17 Aug 2022 14:23:48 +0400 Subject: [PATCH] [#1652] cli/container: Move `eaclPathFrom` flag var into the struct Signed-off-by: Leonard Lyubich --- cmd/neofs-cli/modules/container/set_eacl.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/neofs-cli/modules/container/set_eacl.go b/cmd/neofs-cli/modules/container/set_eacl.go index 22fc7ec574..0558078fce 100644 --- a/cmd/neofs-cli/modules/container/set_eacl.go +++ b/cmd/neofs-cli/modules/container/set_eacl.go @@ -13,10 +13,10 @@ import ( "github.com/spf13/cobra" ) -var eaclPathFrom string - var flagVarsSetEACL struct { preCheck bool + + srcPath string } var setExtendedACLCmd = &cobra.Command{ @@ -26,7 +26,7 @@ var setExtendedACLCmd = &cobra.Command{ Container ID in EACL table will be substituted with ID from the CLI.`, Run: func(cmd *cobra.Command, args []string) { id := parseContainerID(cmd) - eaclTable := common.ReadEACL(cmd, eaclPathFrom) + eaclTable := common.ReadEACL(cmd, flagVarsSetEACL.srcPath) var tok *session.Container @@ -104,7 +104,7 @@ func initContainerSetEACLCmd() { flags := setExtendedACLCmd.Flags() flags.StringVar(&containerID, "cid", "", "container ID") - flags.StringVar(&eaclPathFrom, "table", "", "path to file with JSON or binary encoded EACL table") + flags.StringVar(&flagVarsSetEACL.srcPath, "table", "", "path to file with JSON or binary encoded EACL table") flags.BoolVar(&containerAwait, "await", false, "block execution until EACL is persisted") flags.BoolVar(&flagVarsSetEACL.preCheck, "precheck", false, "pre-check the extensibility of the container ACL") }