feat: fix lint error (#3050)

This commit is contained in:
thinkerou 2022-02-07 23:15:44 +08:00 committed by GitHub
parent b40ded1837
commit 87e40d6b15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -90,7 +90,12 @@ func TestH2c(t *testing.T) {
r.GET("/", func(c *Context) { r.GET("/", func(c *Context) {
c.String(200, "<h1>Hello world</h1>") c.String(200, "<h1>Hello world</h1>")
}) })
go http.Serve(ln, r.Handler()) go func() {
err := http.Serve(ln, r.Handler())
if err != nil {
fmt.Println(err)
}
}()
defer ln.Close() defer ln.Close()
url := "http://" + ln.Addr().String() + "/" url := "http://" + ln.Addr().String() + "/"