docs: starting in Go 1.17, use go install. (#210)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# gin-swagger
|
# gin-swagger
|
||||||
|
|
||||||
gin middleware to automatically generate RESTFUL API documentation with Swagger 2.0.
|
gin middleware to automatically generate RESTful API documentation with Swagger 2.0.
|
||||||
|
|
||||||
[](https://github.com/features/actions)
|
[](https://github.com/features/actions)
|
||||||
[](https://codecov.io/gh/swaggo/gin-swagger)
|
[](https://codecov.io/gh/swaggo/gin-swagger)
|
||||||
@@ -19,6 +19,12 @@ gin middleware to automatically generate RESTFUL API documentation with Swagger
|
|||||||
go get -u github.com/swaggo/swag/cmd/swag
|
go get -u github.com/swaggo/swag/cmd/swag
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Starting in Go 1.17, installing executables with `go get` is deprecated. `go install` may be used instead:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
go install github.com/swaggo/swag/cmd/swag
|
||||||
|
```
|
||||||
|
|
||||||
3. Run the [Swag](https://github.com/swaggo/swag) at your Go project root path(for instance `~/root/go-peoject-name`),
|
3. Run the [Swag](https://github.com/swaggo/swag) at your Go project root path(for instance `~/root/go-peoject-name`),
|
||||||
[Swag](https://github.com/swaggo/swag) will parse comments and generate required files(`docs` folder and `docs/doc.go`)
|
[Swag](https://github.com/swaggo/swag) will parse comments and generate required files(`docs` folder and `docs/doc.go`)
|
||||||
at `~/root/go-peoject-name/docs`.
|
at `~/root/go-peoject-name/docs`.
|
||||||
|
|||||||
Reference in New Issue
Block a user