[#1041] cmd/*: factor out autocomplet command generation

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-01-11 15:24:06 +03:00 committed by Alex Vanin
parent fe29080ebb
commit efabffbfd0
4 changed files with 69 additions and 114 deletions

View file

@ -6,6 +6,7 @@ import (
"github.com/nspcc-dev/neofs-node/cmd/neofs-adm/internal/modules/config"
"github.com/nspcc-dev/neofs-node/cmd/neofs-adm/internal/modules/morph"
"github.com/nspcc-dev/neofs-node/misc"
"github.com/nspcc-dev/neofs-node/pkg/util/autocomplete"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
@ -34,7 +35,7 @@ func init() {
rootCmd.AddCommand(config.RootCmd)
rootCmd.AddCommand(morph.RootCmd)
rootCmd.AddCommand(completionCmd)
rootCmd.AddCommand(autocomplete.Command("neofs-adm"))
}
func Execute() error {