fix id String() instead

This commit is contained in:
Chris Lu 2018-08-23 22:44:30 -07:00
parent 694f93de80
commit d361a1ddf5

View file

@ -33,11 +33,11 @@ func BytesToNeedleId(bytes []byte) NeedleId {
}
func (k NeedleId) String() string {
return strconv.FormatUint(uint64(k), 10)
return strconv.FormatUint(uint64(k), 16)
}
func ParseNeedleId(idString string) (NeedleId, error) {
key, err := strconv.ParseUint(idString, 10, 64)
key, err := strconv.ParseUint(idString, 16, 64)
if err != nil {
return 0, fmt.Errorf("needle id %s format error: %v", idString, err)
}