swaggo / swag

Automatically generate RESTful API documentation with Swagger 2.0 for Go.
MIT License
10.24k stars 1.17k forks source link

Add the ability to read from stdin and write to stdout. #1831

Closed bfbonatto closed 1 month ago

bfbonatto commented 1 month ago

A common feature of code formatters is the ability to read source from standard input and write changes to standard output. One advantage of this approach is the possibility to chain formatters in order to achieve a novel result.

I have added that ability to the swag fmt command. This issue is simply to comply with the project's contribution process.