From 723f9987dc91f554092d9772c210b5fa533892e1 Mon Sep 17 00:00:00 2001 From: Romel Campbell Date: Fri, 22 Sep 2023 14:34:40 -0400 Subject: [PATCH] renamed comand to 'backup_yaml' and made it a sub-command of check --- cmd/{config.go => backup_yaml.go} | 7 +++---- go.mod | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) rename cmd/{config.go => backup_yaml.go} (95%) diff --git a/cmd/config.go b/cmd/backup_yaml.go similarity index 95% rename from cmd/config.go rename to cmd/backup_yaml.go index 25c9641c..20e44927 100644 --- a/cmd/config.go +++ b/cmd/backup_yaml.go @@ -3,15 +3,14 @@ package cmd import ( "fmt" "strings" - "github.com/spf13/cobra" "github.com/zilliztech/milvus-backup/core/paramtable" "gopkg.in/yaml.v3" ) var configCmd = &cobra.Command{ - Use: "config", - Short: "config subcommand to print the milvus config in yaml format.", + Use: "backup_yaml", + Short: "backup_yaml is a subcommand to check. It prints the current backup config file in yaml format to stdio.", Run: func(cmd *cobra.Command, args []string) { var params paramtable.BackupParams @@ -61,7 +60,7 @@ type YAMLConFig struct { } func init() { - rootCmd.AddCommand(configCmd) + checkCmd.AddCommand(configCmd) } func printParams(base *paramtable.BackupParams) { diff --git a/go.mod b/go.mod index d7385baf..bda4cf4c 100644 --- a/go.mod +++ b/go.mod @@ -33,6 +33,7 @@ require ( golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 google.golang.org/grpc v1.48.0 gopkg.in/natefinch/lumberjack.v2 v2.0.0 + gopkg.in/yaml.v3 v3.0.1 ) require ( @@ -104,7 +105,6 @@ require ( google.golang.org/protobuf v1.30.0 // indirect gopkg.in/ini.v1 v1.62.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/milvus-io/milvus-sdk-go/v2 => github.com/wayblink/milvus-sdk-go/v2 v2.3.0-beta5