Skip to content

Commit

Permalink
Update encode.go
Browse files Browse the repository at this point in the history
  • Loading branch information
khorevaa authored Sep 6, 2021
1 parent 161b7e3 commit 3ca9153
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ras/codec256/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func FormatTime(w io.Writer, value interface{}) error {
case *pb.Timestamp:
val = tVal.AsTime().UnixNano()
default:
return &TypeEncoderError{"time", "TODO"}
return &TypeEncoderError{"time", fmt.Sprintf("%s", reflect.TypeOf(tVal))}
}
ticks := val / int64(time.Millisecond)
ticks = ticks*10 + AgeDelta
Expand Down Expand Up @@ -120,7 +120,7 @@ func FormatShort(w io.Writer, value interface{}) error {
case *uint:
val = uint16(*tVal)
default:
return &TypeEncoderError{"short", "TODO"}
return &TypeEncoderError{"short", fmt.Sprintf("%s", reflect.TypeOf(tVal))}
}
buf := make([]byte, SIZEOF_SHORT)
binary.BigEndian.PutUint16(buf, val)
Expand Down

0 comments on commit 3ca9153

Please sign in to comment.