(_ *cobra.Command, args []string)
| 99 | } |
| 100 | |
| 101 | func iterateBucketCommandFunc(_ *cobra.Command, args []string) { |
| 102 | if len(args) != 2 { |
| 103 | log.Fatalf("Must provide 2 arguments (got %v)", args) |
| 104 | } |
| 105 | dp := args[0] |
| 106 | if !strings.HasSuffix(dp, "db") { |
| 107 | dp = filepath.Join(snapDir(dp), "db") |
| 108 | } |
| 109 | if !existFileOrDir(dp) { |
| 110 | log.Fatalf("%q does not exist", dp) |
| 111 | } |
| 112 | bucket := args[1] |
| 113 | err := iterateBucket(dp, bucket, iterateBucketLimit, iterateBucketDecode) |
| 114 | if err != nil { |
| 115 | log.Fatal(err) |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | func scanKeysCommandFunc(_ *cobra.Command, args []string) { |
| 120 | if len(args) != 2 { |
nothing calls this directly
no test coverage detected
searching dependent graphs…