File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -86,15 +86,24 @@ func finalFormmatedSqlxFileContents(sqlxFileMetaData *sqlxParserMeta) string {
86
86
87
87
preOpsBlockContent := ""
88
88
if len (preOpsBlocks ) > 0 {
89
- for _ , preOpsBlock := range preOpsBlocks {
90
- preOpsBlockContent += preOpsBlock .preOpsBlockContent + spaceBetweenSameOps
89
+ for idx , preOpsBlock := range preOpsBlocks {
90
+ if idx == len (preOpsBlocks )- 1 {
91
+ preOpsBlockContent += preOpsBlock .preOpsBlockContent
92
+ } else {
93
+ preOpsBlockContent += preOpsBlock .preOpsBlockContent + spaceBetweenSameOps
94
+ }
95
+
91
96
}
92
97
}
93
98
94
99
postOpsBlockContent := ""
95
100
if len (postOpsBlocks ) > 0 {
96
- for _ , postOpsBlock := range postOpsBlocks {
97
- postOpsBlockContent += postOpsBlock .postOpsBlockContent + spaceBetweenSameOps
101
+ for idx , postOpsBlock := range postOpsBlocks {
102
+ if idx == len (postOpsBlocks )- 1 {
103
+ postOpsBlockContent += postOpsBlock .postOpsBlockContent
104
+ } else {
105
+ postOpsBlockContent += postOpsBlock .postOpsBlockContent + spaceBetweenSameOps
106
+ }
98
107
}
99
108
}
100
109
You can’t perform that action at this time.
0 commit comments