diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-11-21 16:50:06 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-11-21 16:50:06 +0100 |
| commit | b701d19e8b8b45226f6cb1090dd160eea989ca7e (patch) | |
| tree | e576a0b507a84a49a582b0c433314067238ae9de /internal | |
| parent | 1a24a6d651c1b67612a62e53dc8837659b4ddb1b (diff) | |
levenshtein: Use the builtin function min
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/levenshtein/levenshtein.go | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/internal/levenshtein/levenshtein.go b/internal/levenshtein/levenshtein.go index cf28607..68108bc 100644 --- a/internal/levenshtein/levenshtein.go +++ b/internal/levenshtein/levenshtein.go @@ -10,14 +10,6 @@ import ( "golang.org/x/text/unicode/norm" ) -// min returns the min of a and b -func min(a, b int) int { - if a < b { - return a - } - return b -} - // levenshtein is an algorithm that returns the "distance" between two strings // the distance for hello and helloxd is 2 because it takes two inserts to go from hello to helloxd // the distance between hello and hello is 0 because the strings are equal |
