mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-25 01:35:18 -06:00
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:
+18
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user