func Example() { s1 := "kitten" s2 := "sitting" distance, err := levenshtein.ComputeDistance(s1, s2) if err != nil { // handle error } fmt.Printf("The distance between %s and %s is %d.\n", s1, s2, distance) // Output: // The distance between kitten and sitting is 3. }
func dist(a, b string) int { a = Normalize(a) b = Normalize(b) d, _ := levenshtein.ComputeDistance(a, b) //this never actually returns an error return d }