From 3ca915357d8aeb1d4e09cf3eac4fd709db827b7b Mon Sep 17 00:00:00 2001 From: Aleksey Khorev <665525+khorevaa@users.noreply.github.com> Date: Tue, 7 Sep 2021 00:14:56 +0300 Subject: [PATCH] Update encode.go --- ras/codec256/encode.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ras/codec256/encode.go b/ras/codec256/encode.go index f1bb17d..b827995 100644 --- a/ras/codec256/encode.go +++ b/ras/codec256/encode.go @@ -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 @@ -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)