test
test / release-check (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
test / 1.25/ubuntu-latest (push) Has been cancelled
test / 1.25/windows-latest (push) Has been cancelled
test / 1.26/macos-14 (push) Has been cancelled
test / 1.26/macos-latest (push) Has been cancelled
test / 1.26/ubuntu-latest (push) Has been cancelled
test / 1.26/windows-latest (push) Has been cancelled
test / 1.25/macos-latest (push) Has been cancelled
test / 1.25/macos-14 (push) Has been cancelled
test / release-check (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
test / 1.25/ubuntu-latest (push) Has been cancelled
test / 1.25/windows-latest (push) Has been cancelled
test / 1.26/macos-14 (push) Has been cancelled
test / 1.26/macos-latest (push) Has been cancelled
test / 1.26/ubuntu-latest (push) Has been cancelled
test / 1.26/windows-latest (push) Has been cancelled
test / 1.25/macos-latest (push) Has been cancelled
test / 1.25/macos-14 (push) Has been cancelled
This commit is contained in:
+3
-3
@@ -271,7 +271,7 @@ func (enc *Encoder) encode(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, e
|
|||||||
return append(b, x.String()...), nil
|
return append(b, x.String()...), nil
|
||||||
case json.Number:
|
case json.Number:
|
||||||
if enc.marshalJSONNumbers {
|
if enc.marshalJSONNumbers {
|
||||||
if x == "" { /// Useful zero value.
|
if x == "" { // / Useful zero value.
|
||||||
return append(b, "0"...), nil
|
return append(b, "0"...), nil
|
||||||
} else if v, err := x.Int64(); err == nil {
|
} else if v, err := x.Int64(); err == nil {
|
||||||
return enc.encode(b, ctx, reflect.ValueOf(v))
|
return enc.encode(b, ctx, reflect.ValueOf(v))
|
||||||
@@ -1110,7 +1110,7 @@ func (enc *Encoder) encodeSliceAsArrayTable(b []byte, ctx encoderCtx, v reflect.
|
|||||||
scratch = enc.indent(ctx.indent, scratch)
|
scratch = enc.indent(ctx.indent, scratch)
|
||||||
}
|
}
|
||||||
|
|
||||||
scratch = append(scratch, "[["...)
|
scratch = append(scratch, "["...)
|
||||||
|
|
||||||
for i, k := range ctx.parentKey {
|
for i, k := range ctx.parentKey {
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
@@ -1120,7 +1120,7 @@ func (enc *Encoder) encodeSliceAsArrayTable(b []byte, ctx encoderCtx, v reflect.
|
|||||||
scratch = enc.encodeKey(scratch, k)
|
scratch = enc.encodeKey(scratch, k)
|
||||||
}
|
}
|
||||||
|
|
||||||
scratch = append(scratch, "]]\n"...)
|
scratch = append(scratch, "]\n"...)
|
||||||
ctx.skipTableHeader = true
|
ctx.skipTableHeader = true
|
||||||
|
|
||||||
b = enc.encodeComment(ctx.indent, ctx.options.comment, b)
|
b = enc.encodeComment(ctx.indent, ctx.options.comment, b)
|
||||||
|
|||||||
Reference in New Issue
Block a user