-
Is this how its supposed to be done?
```
package main
import (
"log"
"net/http"
"time"
"github.com/gin-gonic/gin"
"golang.org/x/sync/errgroup"
)
var (
g errgroup.Group
)
fun…
-
+ https://www.bilibili.com/video/BV1TK42147eW/
tangx updated
5 months ago
-
Add endpoints for grouping (with filtering). Could see much more than the below example, but would be a good start.
Example request, which is something very helpful for a UI which has a filter/select…
-
If set the handler time.Sleep same as the timeout, there is a chance to reproduce this error!
```go
api.GET("/test", timeout.New(
timeout.WithTimeout(200*time.Microsecond),
timeout.WithHan…
-
Hi, looking at the page:
https://gin-gonic.com/docs/examples/html-rendering/
specifically this example:
```
func main() {
router := gin.Default()
router.LoadHTMLGlob("templates/**/*")
…
-
```
type badRequest struct { error }
type notFound error
func checkError(e error) int {
switch e.(type) {
case badRequest: return http.StatusBadRequest
case notFound: return http.S…
seebs updated
5 months ago
-
### Application state
This proposal seeks to introduce an Application State Management feature in Echo.
This feature will enable the ability to access a store **application wide**. Mmiddlewares a…
-
```
// trace info
type TraceInfo struct{
Id_ bson.ObjectId `form:"_id" json:"_id" bson:"_id"`
Search SearchInfo `form:"search" json:"search" bson:"search"`
}
// search
type SearchI…
-
Multiple calls to `response.WriteHeader` (package `net/http`) are superfluous.
Examples:
```
w.WriteHeader(http.StatusOK)
if _, err := w.Write([]byte("ok")); err != nil {
w.WriteHeader(http.…
breml updated
11 months ago
-
I think there should be something like
if res.StatusCode != http.StatusOK {
after
res, err := c.httpClient.Do(r)
In case the server returns a 400 or a 500, the current code returns…