diff --git a/modhex.go b/modhex.go index 0cda637..0ae17bd 100644 --- a/modhex.go +++ b/modhex.go @@ -7,11 +7,13 @@ import ( "strings" ) +// modhex character table for encoding const modhexTable = "cbdefghijklnrtuv" var modhexMap map[byte]byte func init() { + // create a map from byte to modhex for decoding modhexMap = make(map[byte]byte) for i, v := range []byte(modhexTable) { modhexMap[v] = byte(i)