From 87b93ad8a4d5c445e6318950832ac1b9667bd4d5 Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Fri, 7 May 2021 01:04:25 +0900 Subject: [PATCH] Fix lint error --- internal/encoder/vm/vm.go | 24 ++++++++++++------------ internal/encoder/vm_debug/vm.go | 24 ++++++++++++------------ internal/encoder/vm_escaped/vm.go | 24 ++++++++++++------------ internal/encoder/vm_escaped_indent/vm.go | 24 ++++++++++++------------ internal/encoder/vm_indent/vm.go | 24 ++++++++++++------------ 5 files changed, 60 insertions(+), 60 deletions(-) diff --git a/internal/encoder/vm/vm.go b/internal/encoder/vm/vm.go index 9039bee..807482c 100644 --- a/internal/encoder/vm/vm.go +++ b/internal/encoder/vm/vm.go @@ -2630,8 +2630,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) code = code.Next } case encoder.OpStructPtrHeadNumberPtr: @@ -2787,8 +2787,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructPtrHeadArray, encoder.OpStructPtrHeadSlice: @@ -4039,8 +4039,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructFieldNumberPtr: @@ -4096,8 +4096,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructFieldMarshalJSON: @@ -4975,8 +4975,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendStructEnd(bb) + b = append(bb, '"') + b = appendStructEnd(b) } else { b = appendStructEndSkipLast(b) } @@ -5036,8 +5036,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendStructEnd(bb) + b = append(bb, '"') + b = appendStructEnd(b) } else { b = appendStructEndSkipLast(b) } diff --git a/internal/encoder/vm_debug/vm.go b/internal/encoder/vm_debug/vm.go index d1a2094..55b02d2 100644 --- a/internal/encoder/vm_debug/vm.go +++ b/internal/encoder/vm_debug/vm.go @@ -2643,8 +2643,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) code = code.Next } case encoder.OpStructPtrHeadNumberPtr: @@ -2800,8 +2800,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructPtrHeadArray, encoder.OpStructPtrHeadSlice: @@ -4052,8 +4052,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructFieldNumberPtr: @@ -4109,8 +4109,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructFieldMarshalJSON: @@ -4988,8 +4988,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendStructEnd(bb) + b = append(bb, '"') + b = appendStructEnd(b) } else { b = appendStructEndSkipLast(b) } @@ -5049,8 +5049,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendStructEnd(bb) + b = append(bb, '"') + b = appendStructEnd(b) } else { b = appendStructEndSkipLast(b) } diff --git a/internal/encoder/vm_escaped/vm.go b/internal/encoder/vm_escaped/vm.go index 4861fea..55947ec 100644 --- a/internal/encoder/vm_escaped/vm.go +++ b/internal/encoder/vm_escaped/vm.go @@ -2630,8 +2630,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) code = code.Next } case encoder.OpStructPtrHeadNumberPtr: @@ -2787,8 +2787,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructPtrHeadArray, encoder.OpStructPtrHeadSlice: @@ -4039,8 +4039,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructFieldNumberPtr: @@ -4096,8 +4096,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructFieldMarshalJSON: @@ -4975,8 +4975,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendStructEnd(bb) + b = append(bb, '"') + b = appendStructEnd(b) } else { b = appendStructEndSkipLast(b) } @@ -5036,8 +5036,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendStructEnd(bb) + b = append(bb, '"') + b = appendStructEnd(b) } else { b = appendStructEndSkipLast(b) } diff --git a/internal/encoder/vm_escaped_indent/vm.go b/internal/encoder/vm_escaped_indent/vm.go index f5fc20d..6ff4210 100644 --- a/internal/encoder/vm_escaped_indent/vm.go +++ b/internal/encoder/vm_escaped_indent/vm.go @@ -2754,8 +2754,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) code = code.Next } case encoder.OpStructPtrHeadNumberPtr: @@ -2918,8 +2918,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructPtrHeadArray, encoder.OpStructPtrHeadSlice: @@ -4302,8 +4302,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructFieldNumberPtr: @@ -4366,8 +4366,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructFieldMarshalJSON: @@ -5399,8 +5399,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendStructEnd(ctx, bb, code.Indent-1) + b = append(bb, '"') + b = appendStructEnd(ctx, b, code.Indent-1) } else { b = appendStructEndSkipLast(ctx, b, code) } @@ -5467,8 +5467,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendStructEnd(ctx, bb, code.Indent-1) + b = append(bb, '"') + b = appendStructEnd(ctx, b, code.Indent-1) } else { b = appendStructEndSkipLast(ctx, b, code) } diff --git a/internal/encoder/vm_indent/vm.go b/internal/encoder/vm_indent/vm.go index a288c2a..5f93dd2 100644 --- a/internal/encoder/vm_indent/vm.go +++ b/internal/encoder/vm_indent/vm.go @@ -2754,8 +2754,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) code = code.Next } case encoder.OpStructPtrHeadNumberPtr: @@ -2918,8 +2918,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructPtrHeadArray, encoder.OpStructPtrHeadSlice: @@ -4302,8 +4302,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructFieldNumberPtr: @@ -4366,8 +4366,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendComma(bb) + b = append(bb, '"') + b = appendComma(b) } code = code.Next case encoder.OpStructFieldMarshalJSON: @@ -5399,8 +5399,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendStructEnd(ctx, bb, code.Indent-1) + b = append(bb, '"') + b = appendStructEnd(ctx, b, code.Indent-1) } else { b = appendStructEndSkipLast(ctx, b, code) } @@ -5467,8 +5467,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt if err != nil { return nil, err } - b = append(b, '"') - b = appendStructEnd(ctx, bb, code.Indent-1) + b = append(bb, '"') + b = appendStructEnd(ctx, b, code.Indent-1) } else { b = appendStructEndSkipLast(ctx, b, code) }