mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-14 20:22:20 +08:00
docs: refine project documentation and CI configurations
- Update supported Go versions for GitHub actions to `1.21` and `1.22` - Specify the required Go version as `1.21` or above in README - Change code block syntax to `sh` in installation and demo run instructions - Remove empty lines in README sections - Update project list formatting without changing the content Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
4ece6ecf40
commit
61dbaa6d85
2
.github/workflows/gin.yml
vendored
2
.github/workflows/gin.yml
vendored
@ -33,7 +33,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-latest, macos-latest]
|
||||||
go: ["1.20", "1.21", "1.22"]
|
go: ["1.21", "1.22"]
|
||||||
test-tags:
|
test-tags:
|
||||||
["", "-tags nomsgpack", '-tags "sonic avx"', "-tags go_json", "-race"]
|
["", "-tags nomsgpack", '-tags "sonic avx"', "-tags go_json", "-race"]
|
||||||
include:
|
include:
|
||||||
|
25
README.md
25
README.md
@ -25,18 +25,17 @@ Gin is a web framework written in [Go](https://go.dev/). It features a martini-l
|
|||||||
- Rendering built-in
|
- Rendering built-in
|
||||||
- Extendable
|
- Extendable
|
||||||
|
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- **[Go](https://go.dev/)**: any one of the **three latest major** [releases](https://go.dev/doc/devel/release) (we test it with these).
|
The required version of [Go](https://go.dev/) language is [1.21](https://go.dev/doc/devel/release#go1.21.0) or above.
|
||||||
|
|
||||||
### Getting Gin
|
### Getting Gin
|
||||||
|
|
||||||
With [Go module](https://github.com/golang/go/wiki/Modules) support, simply add the following import
|
With [Go module](https://github.com/golang/go/wiki/Modules) support, simply add the following import
|
||||||
|
|
||||||
```
|
```sh
|
||||||
import "github.com/gin-gonic/gin"
|
import "github.com/gin-gonic/gin"
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -45,7 +44,7 @@ to your code, and then `go [build|run|test]` will automatically fetch the necess
|
|||||||
Otherwise, run the following Go command to install the `gin` package:
|
Otherwise, run the following Go command to install the `gin` package:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ go get -u github.com/gin-gonic/gin
|
go get -u github.com/gin-gonic/gin
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running Gin
|
### Running Gin
|
||||||
@ -74,7 +73,7 @@ func main() {
|
|||||||
|
|
||||||
And use the Go command to run the demo:
|
And use the Go command to run the demo:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# run example.go and visit 0.0.0.0:8080/ping on browser
|
# run example.go and visit 0.0.0.0:8080/ping on browser
|
||||||
$ go run example.go
|
$ go run example.go
|
||||||
```
|
```
|
||||||
@ -89,7 +88,6 @@ Learn and practice more examples, please read the [Gin Quick Start](docs/doc.md)
|
|||||||
|
|
||||||
A number of ready-to-run examples demonstrating various use cases of Gin on the [Gin examples](https://github.com/gin-gonic/examples) repository.
|
A number of ready-to-run examples demonstrating various use cases of Gin on the [Gin examples](https://github.com/gin-gonic/examples) repository.
|
||||||
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
See [API documentation and descriptions](https://godoc.org/github.com/gin-gonic/gin) for package.
|
See [API documentation and descriptions](https://godoc.org/github.com/gin-gonic/gin) for package.
|
||||||
@ -153,23 +151,20 @@ Gin uses a custom version of [HttpRouter](https://github.com/julienschmidt/httpr
|
|||||||
- (3): Heap Memory (B/op), lower is better
|
- (3): Heap Memory (B/op), lower is better
|
||||||
- (4): Average Allocations per Repetition (allocs/op), lower is better
|
- (4): Average Allocations per Repetition (allocs/op), lower is better
|
||||||
|
|
||||||
|
|
||||||
## Middlewares
|
## Middlewares
|
||||||
|
|
||||||
You can find many useful Gin middlewares at [gin-contrib](https://github.com/gin-contrib).
|
You can find many useful Gin middlewares at [gin-contrib](https://github.com/gin-contrib).
|
||||||
|
|
||||||
|
|
||||||
## Users
|
## Users
|
||||||
|
|
||||||
Awesome project lists using [Gin](https://github.com/gin-gonic/gin) web framework.
|
Awesome project lists using [Gin](https://github.com/gin-gonic/gin) web framework.
|
||||||
|
|
||||||
* [gorush](https://github.com/appleboy/gorush): A push notification server written in Go.
|
- [gorush](https://github.com/appleboy/gorush): A push notification server written in Go.
|
||||||
* [fnproject](https://github.com/fnproject/fn): The container native, cloud agnostic serverless platform.
|
- [fnproject](https://github.com/fnproject/fn): The container native, cloud agnostic serverless platform.
|
||||||
* [photoprism](https://github.com/photoprism/photoprism): Personal photo management powered by Go and Google TensorFlow.
|
- [photoprism](https://github.com/photoprism/photoprism): Personal photo management powered by Go and Google TensorFlow.
|
||||||
* [lura](https://github.com/luraproject/lura): Ultra performant API Gateway with middlewares.
|
- [lura](https://github.com/luraproject/lura): Ultra performant API Gateway with middlewares.
|
||||||
* [picfit](https://github.com/thoas/picfit): An image resizing server written in Go.
|
- [picfit](https://github.com/thoas/picfit): An image resizing server written in Go.
|
||||||
* [dkron](https://github.com/distribworks/dkron): Distributed, fault tolerant job scheduling system.
|
- [dkron](https://github.com/distribworks/dkron): Distributed, fault tolerant job scheduling system.
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user