2
0

docs: improve test coverage and update CI configurations

- Update badge text from "Build Status" to "Run Tests"
- Change code block language from unspecified to `sh`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2024-12-31 15:41:35 +08:00
parent de96a1faf5
commit cffc294e1b
+5 -3
View File
@@ -1,7 +1,7 @@
# Server-Sent Events # Server-Sent Events
[![Go Reference](https://pkg.go.dev/badge/github.com/gin-contrib/sse.svg)](https://pkg.go.dev/github.com/gin-contrib/sse) [![Go Reference](https://pkg.go.dev/badge/github.com/gin-contrib/sse.svg)](https://pkg.go.dev/github.com/gin-contrib/sse)
[![Build Status](https://github.com/gin-contrib/sse/actions/workflows/go.yml/badge.svg)](https://github.com/gin-contrib/sse/actions/workflows/go.yml) [![Run Tests](https://github.com/gin-contrib/sse/actions/workflows/go.yml/badge.svg)](https://github.com/gin-contrib/sse/actions/workflows/go.yml)
[![codecov](https://codecov.io/gh/gin-contrib/sse/branch/master/graph/badge.svg)](https://codecov.io/gh/gin-contrib/sse) [![codecov](https://codecov.io/gh/gin-contrib/sse/branch/master/graph/badge.svg)](https://codecov.io/gh/gin-contrib/sse)
[![Go Report Card](https://goreportcard.com/badge/github.com/gin-contrib/sse)](https://goreportcard.com/report/github.com/gin-contrib/sse) [![Go Report Card](https://goreportcard.com/badge/github.com/gin-contrib/sse)](https://goreportcard.com/report/github.com/gin-contrib/sse)
@@ -34,7 +34,8 @@ func httpHandler(w http.ResponseWriter, req *http.Request) {
}) })
} }
``` ```
```
```sh
event: message event: message
data: some data\\nmore data data: some data\\nmore data
@@ -49,7 +50,8 @@ data: {"content":"hi!","date":1431540810,"user":"manu"}
```go ```go
fmt.Println(sse.ContentType) fmt.Println(sse.ContentType)
``` ```
```
```sh
text/event-stream text/event-stream
``` ```