mirror of https://github.com/goccy/go-json.git
Fix indent issue for embed struct with tag
This commit is contained in:
parent
ac9a7dd8e3
commit
a95c5abe6c
|
@ -1425,7 +1425,10 @@ func compileStruct(ctx *compileContext, isPtr bool) (*Opcode, error) {
|
||||||
for k, v := range anonymousStructFieldPairMap(tags, tagKey, valueCode) {
|
for k, v := range anonymousStructFieldPairMap(tags, tagKey, valueCode) {
|
||||||
anonymousFields[k] = append(anonymousFields[k], v...)
|
anonymousFields[k] = append(anonymousFields[k], v...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !tag.IsTaggedKey {
|
||||||
valueCode.decIndent()
|
valueCode.decIndent()
|
||||||
|
}
|
||||||
|
|
||||||
// fix issue144
|
// fix issue144
|
||||||
if !(isPtr && strings.Contains(valueCode.Op.String(), "Marshal")) {
|
if !(isPtr && strings.Contains(valueCode.Op.String(), "Marshal")) {
|
||||||
|
|
Loading…
Reference in New Issue