@@ -354,9 +354,9 @@ func IdentityConvertComplexArrayProperty(
354
354
355
355
emptySlice := astbuilder .SliceLiteral (destinationTypeExpr )
356
356
assignEmpty := astbuilder .SimpleAssignment (params .GetDestination (), emptySlice )
357
- astbuilder .AddComments (
357
+ astbuilder .AddComment (
358
358
& assignEmpty .Decs .Start ,
359
- [] string { "// Set property to empty map, as this resource is set to serialize all collections explicitly" } )
359
+ "// Set property to empty map, as this resource is set to serialize all collections explicitly" )
360
360
assignEmpty .Decs .Before = dst .NewLine
361
361
362
362
ifNil := astbuilder .IfNil (
@@ -471,20 +471,20 @@ func IdentityConvertComplexMapProperty(
471
471
emptyMap := astbuilder .MakeMap (keyTypeExpr , valueTypeExpr )
472
472
473
473
assignEmpty := astbuilder .SimpleAssignment (params .GetDestination (), emptyMap )
474
- astbuilder .AddComments (
474
+ astbuilder .AddComment (
475
475
& assignEmpty .Decs .Start ,
476
- [] string { "// Set property to empty map, as this resource is set to serialize all collections explicitly" } )
476
+ "// Set property to empty map, as this resource is set to serialize all collections explicitly" )
477
477
assignEmpty .Decs .Before = dst .NewLine
478
478
479
479
result = astbuilder .SimpleIfElse (
480
480
astbuilder .NotNil (params .GetSource ()),
481
- []dst. Stmt {
481
+ astbuilder . Statements (
482
482
makeMapStatement ,
483
483
rangeStatement ,
484
- } ,
485
- []dst. Stmt {
484
+ ) ,
485
+ astbuilder . Statements (
486
486
assignEmpty ,
487
- } ,
487
+ ) ,
488
488
)
489
489
} else {
490
490
result = astbuilder .IfNotNil (
@@ -500,7 +500,7 @@ func IdentityConvertComplexMapProperty(
500
500
result .Body .List = append (result .Body .List , params .AssignmentHandler (params .GetDestination (), dst .Clone (destination ).(dst.Expr )))
501
501
}
502
502
503
- return []dst. Stmt { result } , nil
503
+ return astbuilder . Statements ( result ) , nil
504
504
}
505
505
506
506
// IdentityAssignTypeName handles conversion for TypeName's that are the same
0 commit comments