build(deps): bump github.com/sergi/go-diff from 1.1.0 to 1.3.1 (#6473)

Bumps [github.com/sergi/go-diff](https://github.com/sergi/go-diff) from 1.1.0 to 1.3.1.
- [Commits](https://github.com/sergi/go-diff/compare/v1.1.0...v1.3.1)

---
updated-dependencies:
- dependency-name: github.com/sergi/go-diff
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot]
2023-12-12 12:28:18 +01:00
committed by GitHub
parent ef9e8376d3
commit 5c3d3f7635
6 changed files with 94 additions and 70 deletions
+18
View File
@@ -9,6 +9,7 @@
package diffmatchpatch
import (
"strconv"
"strings"
"unicode/utf8"
)
@@ -86,3 +87,20 @@ func runesIndex(r1, r2 []rune) int {
}
return -1
}
func intArrayToString(ns []uint32) string {
if len(ns) == 0 {
return ""
}
indexSeparator := IndexSeparator[0]
// Appr. 3 chars per num plus the comma.
b := []byte{}
for _, n := range ns {
b = strconv.AppendInt(b, int64(n), 10)
b = append(b, indexSeparator)
}
b = b[:len(b)-1]
return string(b)
}