diff --git a/br/pkg/utils/key.go b/br/pkg/utils/key.go index 62d194ca57a2e..db4e884003d9d 100644 --- a/br/pkg/utils/key.go +++ b/br/pkg/utils/key.go @@ -37,7 +37,7 @@ func ParseKey(format, key string) ([]byte, error) { // Ref PD: https://github.com/pingcap/pd/blob/master/tools/pd-ctl/pdctl/command/region_command.go#L334 func unescapedKey(text string) ([]byte, error) { var buf []byte - r := bytes.NewBuffer([]byte(text)) + r := bytes.NewBufferString(text) for { c, err := r.ReadByte() if err != nil {