From ef2906180783d2a51f07bc63630e85c4e8b1839f Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Fri, 19 Mar 2021 23:55:01 +0900 Subject: [PATCH] Fix error by linter --- internal/encoder/compiler.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/encoder/compiler.go b/internal/encoder/compiler.go index 100456b..14344da 100644 --- a/internal/encoder/compiler.go +++ b/internal/encoder/compiler.go @@ -201,6 +201,12 @@ func compileHead(ctx *compileContext) (*Opcode, error) { return compileBoolPtr(ctx) } return compileBool(ctx) + case reflect.Interface: + ctx := ctx.withType(typ) + if isPtr { + return compileInterfacePtr(ctx) + } + return compileInterface(ctx) default: if isPtr && typ.Implements(marshalTextType) { typ = orgType