Update license of levenshtein method (#539)
This commit is contained in:
+2
-2
@@ -2,8 +2,8 @@ package kong
|
|||||||
|
|
||||||
import "unicode/utf8"
|
import "unicode/utf8"
|
||||||
|
|
||||||
// https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#Go
|
// Copied from https://github.com/daviddengcn/go-algs/blob/fe23fabd9d0670e4675326040ba7c285c7117b4c/ed/ed.go#L31
|
||||||
// License: https://creativecommons.org/licenses/by-sa/3.0/
|
// License: https://github.com/daviddengcn/go-algs/blob/fe23fabd9d0670e4675326040ba7c285c7117b4c/LICENSE
|
||||||
func levenshtein(a, b string) int {
|
func levenshtein(a, b string) int {
|
||||||
f := make([]int, utf8.RuneCountInString(b)+1)
|
f := make([]int, utf8.RuneCountInString(b)+1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user