From 3863e4d8d3a39cf0dbc2a610965596ed71d2e94d Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 23 Dec 2024 20:58:57 +0300 Subject: [PATCH] add codec.RawMessage support Signed-off-by: Vasiliy Tolstov --- urlencode.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/urlencode.go b/urlencode.go index ea26880..26d215d 100644 --- a/urlencode.go +++ b/urlencode.go @@ -37,7 +37,10 @@ func (c *urlencodeCodec) Marshal(v interface{}, opts ...codec.Option) ([]byte, e return m.Data, nil case *pb.Frame: return m.Data, nil - + case codec.RawMessage: + return []byte(m), nil + case *codec.RawMessage: + return []byte(*m), nil } uv, err := rutil.StructURLValues(v, "", []string{"protobuf", "json", "xml", "yaml"})