From d50a9f0f39e779d45cfa4c21ab6fd053bc4e6d8e Mon Sep 17 00:00:00 2001 From: Denise Li Date: Tue, 7 May 2024 00:44:57 -0400 Subject: [PATCH] chore: fix forward encoding cast (#1424) Resolves https://github.com/TBD54566975/ftl/pull/1417#discussion_r1591693874 --- go-runtime/encoding/encoding.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go-runtime/encoding/encoding.go b/go-runtime/encoding/encoding.go index 6b7a075594..d2eaacddc8 100644 --- a/go-runtime/encoding/encoding.go +++ b/go-runtime/encoding/encoding.go @@ -33,7 +33,7 @@ func encodeValue(v reflect.Value, w *bytes.Buffer) error { // Special-cased types switch { case t == reflect.TypeFor[time.Time](): - data, err := json.Marshal(v.Interface().(time.Time)) + data, err := json.Marshal(v.Interface()) if err != nil { return err } @@ -41,7 +41,7 @@ func encodeValue(v reflect.Value, w *bytes.Buffer) error { return nil case t == reflect.TypeFor[json.RawMessage](): - data, err := json.Marshal(v.Interface().(json.RawMessage)) + data, err := json.Marshal(v.Interface()) if err != nil { return err }