Here's my attempt to implement Levenshtein Distance in Go, with lots of comments:
https://github.com/cbartley/diffy/blob/master/src/diffy/diff...
https://github.com/cbartley/diffy/blob/master/src/diffy/diff...
I wrote a commented version years back that might be a handy reference; it's since been deprecated because we moved it out of StringUtils, but the original code is here https://github.com/apache/commons-lang/blob/master/src/main/...
That's pretty cool, especially the doubling scheme. I'm using a modified form of Levenshtein Distance for comparing lines when diffing files, and that's pretty expensive since code files that are thousands of lines long are not uncommon. Since you are usually comparing one file to another version of itself, the differences are often small though, so an incremental approach would really pay off.