Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue swaggo#1150 To summarize of the issue, running `swag fmt` will set (at least) 2 spaces between the attribute tag and the rest of the comment. For instance: ``` type Example struct { Foobar string } // @name Example ``` However the doc generation doesn't interpret this correctly for struct (it completly ignore it). So there are 2 solutions: - fix the indent (which is feel more natural) - fix the doc generation to correctly parse 2 spaces This commit is fixing the indent part. Basically I just set the padding=1 on `tabwriter`. The cons is that it will also impacts all other godocs. For instance (taken from the readme): ``` // @title Swagger Example API // @Version 1.0 // @description This is a sample server celler server. // @termsofservice http://swagger.io/terms/ ```
- Loading branch information