⬆️ Update dependencies
This commit is contained in:
+3
-3
@@ -2,8 +2,8 @@ package kong
|
||||
|
||||
import "unicode/utf8"
|
||||
|
||||
// https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#Go
|
||||
// License: https://creativecommons.org/licenses/by-sa/3.0/
|
||||
// Copied from https://github.com/daviddengcn/go-algs/blob/fe23fabd9d0670e4675326040ba7c285c7117b4c/ed/ed.go#L31
|
||||
// License: https://github.com/daviddengcn/go-algs/blob/fe23fabd9d0670e4675326040ba7c285c7117b4c/LICENSE
|
||||
func levenshtein(a, b string) int {
|
||||
f := make([]int, utf8.RuneCountInString(b)+1)
|
||||
|
||||
@@ -31,7 +31,7 @@ func levenshtein(a, b string) int {
|
||||
return f[len(f)-1]
|
||||
}
|
||||
|
||||
func min(a, b int) int {
|
||||
func min(a, b int) int { //nolint:predeclared
|
||||
if a <= b {
|
||||
return a
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user