Skip to content

Commit

Permalink
renamed comand to 'backup_yaml' and made it a sub-command of check
Browse files Browse the repository at this point in the history
  • Loading branch information
roca committed Sep 22, 2023
1 parent c7bfebc commit 723f998
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions cmd/config.go → cmd/backup_yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -61,7 +60,7 @@ type YAMLConFig struct {
}

func init() {
rootCmd.AddCommand(configCmd)
checkCmd.AddCommand(configCmd)
}

func printParams(base *paramtable.BackupParams) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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

0 comments on commit 723f998

Please sign in to comment.