The result isn't perfect, but it cleans up the whitespace and makes the code more consistent with the rest of the project.
It won't work yet as there's no gorm file and there's code that has been commented out, but it finally compiles.