summaryrefslogtreecommitdiff
path: root/vendor/github.com/goccy/go-json/internal/encoder/vm/debug_vm.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/goccy/go-json/internal/encoder/vm/debug_vm.go')
-rw-r--r--vendor/github.com/goccy/go-json/internal/encoder/vm/debug_vm.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/github.com/goccy/go-json/internal/encoder/vm/debug_vm.go b/vendor/github.com/goccy/go-json/internal/encoder/vm/debug_vm.go
index fbbc0de44..82b6dd47f 100644
--- a/vendor/github.com/goccy/go-json/internal/encoder/vm/debug_vm.go
+++ b/vendor/github.com/goccy/go-json/internal/encoder/vm/debug_vm.go
@@ -2,6 +2,7 @@ package vm
import (
"fmt"
+ "io"
"github.com/goccy/go-json/internal/encoder"
)
@@ -14,6 +15,11 @@ func DebugRun(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet)
} else {
code = codeSet.NoescapeKeyCode
}
+ if wc := ctx.Option.DebugDOTOut; wc != nil {
+ _, _ = io.WriteString(wc, code.DumpDOT())
+ wc.Close()
+ ctx.Option.DebugDOTOut = nil
+ }
if err := recover(); err != nil {
w := ctx.Option.DebugOut