Ugh on the error comparison.
This conversion is not complete as there are still uses of string directions via the Direction.String method in leveldb.