Skip to content

Commit

Permalink
fix: fix slice init length
Browse files Browse the repository at this point in the history
  • Loading branch information
cuishuang authored Oct 4, 2024
1 parent 9edfcf1 commit 452e0b6
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 452e0b6

Please sign in to comment.