mirror of https://github.com/gofiber/fiber.git
fix unhandled errors and remove unused parameter (#2061)
* fix unhandled errors * fix unhandled error in cache package test * omit variable type * omit variable type * rename variable because collide with the imported package name * handle file error on closing * fix unhandled in common_linux.go * fix unhandled errors in helpers_test.go * fix unhandled errors in listen_test.go * remove unused parameter in emptyHandler methodpull/2064/head
parent
0ebc9113d5
commit
349772d69a
|
@ -166,12 +166,18 @@ func captureOutput(f func()) string {
|
|||
go func() {
|
||||
var buf bytes.Buffer
|
||||
wg.Done()
|
||||
io.Copy(&buf, reader)
|
||||
_, err := io.Copy(&buf, reader)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
out <- buf.String()
|
||||
}()
|
||||
wg.Wait()
|
||||
f()
|
||||
writer.Close()
|
||||
err = writer.Close()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return <-out
|
||||
}
|
||||
|
||||
|
@ -244,6 +250,6 @@ func Test_App_print_Route_with_group(t *testing.T) {
|
|||
utils.AssertEqual(t, true, strings.Contains(printRoutesMessage, "/v1/test/fiber/*"))
|
||||
}
|
||||
|
||||
func emptyHandler(c *Ctx) error {
|
||||
func emptyHandler(_ *Ctx) error {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue