agnivade / levenshtein

Go implementation to calculate Levenshtein Distance.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

return error?

jpillora opened this issue · comments

Nice library, though is there a special reason why you're returning an error?

No specific reason. I just want to conform to the standard return signatures of go functions. If there is a need to actually return an error in the future, it becomes easy.

Ah okay, well idiomatic Go only returns an error when there is one, see http://golang.org/pkg/strings/ - I change see where it'll change much, though I guess I could be wrong

You may be right. For now, I would just prefer to keep it as it is, unless its a big eyesore :)