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) {
|
||||
anonymousFields[k] = append(anonymousFields[k], v...)
|
||||
}
|
||||
valueCode.decIndent()
|
||||
|
||||
if !tag.IsTaggedKey {
|
||||
valueCode.decIndent()
|
||||
}
|
||||
|
||||
// fix issue144
|
||||
if !(isPtr && strings.Contains(valueCode.Op.String(), "Marshal")) {
|
||||
|
|
Loading…
Reference in New Issue