Skip to content

Commit

Permalink
docs: starting in Go 1.17, use go install. (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
lnnt authored May 12, 2022
1 parent bdcc4ec commit eb1f2ff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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.

[![Build Status](https://github.com/swaggo/gin-swagger/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/features/actions)
[![Codecov branch](https://img.shields.io/codecov/c/github/swaggo/gin-swagger/master.svg)](https://codecov.io/gh/swaggo/gin-swagger)
Expand All @@ -19,6 +19,12 @@ gin middleware to automatically generate RESTFUL API documentation with Swagger
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`),
[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`.
Expand Down

0 comments on commit eb1f2ff

Please sign in to comment.