Skip to content

Commit

Permalink
Merge pull request #1019 from cuishuang/master
Browse files Browse the repository at this point in the history
fix: fix slice init length
  • Loading branch information
Slach authored Oct 4, 2024
2 parents 89fe6a0 + 452e0b6 commit e4b7921
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/backup/backup_shard.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type shardFunc func(md *tableReplicaMetadata) (bool, error)
func shardFuncByName(name string) (shardFunc, error) {
chosen, ok := shardFuncRegistry[name]
if !ok {
validOptions := make([]string, len(shardFuncRegistry))
validOptions := make([]string, 0, len(shardFuncRegistry))
for k := range shardFuncRegistry {
if k == "" {
continue
Expand Down

0 comments on commit e4b7921

Please sign in to comment.