Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Oct 2, 2021
1 parent 0e098b6 commit c58eb4c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import "github.com/gin-contrib/rollbar"
package main

import (
"log"

"github.com/gin-contrib/rollbar"
"github.com/gin-gonic/gin"

Expand All @@ -41,6 +43,8 @@ func main() {
r := gin.Default()
r.Use(rollbar.Recovery(true))

r.Run(":8080")
if err := r.Run(":8080"); err != nil {
log.Fatal(err)
}
}
```
6 changes: 5 additions & 1 deletion example/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package main

import (
"log"

"github.com/gin-contrib/rollbar"
"github.com/gin-gonic/gin"

Expand All @@ -14,5 +16,7 @@ func main() {
r := gin.Default()
r.Use(rollbar.Recovery(true))

r.Run(":8080")
if err := r.Run(":8080"); err != nil {
log.Fatal(err)
}
}
4 changes: 2 additions & 2 deletions recovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ func TestRecovery(t *testing.T) {
Err: baseError,
Type: gin.ErrorTypePublic,
}
err.SetMeta("some data")
c.Error(err)
_ = err.SetMeta("some data")
_ = c.Error(err)

panic("occurs panic")
})
Expand Down

0 comments on commit c58eb4c

Please sign in to comment.