Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hwbrzzl committed Dec 31, 2024
1 parent dcf8a3a commit 98401c8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/http/middleware/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func Auth() http.Middleware {

token := ctx.Request().Header("Authorization", "")
if token == "" {
ctx.Response().String(http.StatusUnauthorized, "Unauthorized").Abort()
_ = ctx.Response().String(http.StatusUnauthorized, "Unauthorized").Abort()
return
}

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func main() {
bootstrap.Boot()

// Create a channel to listen for OS signals
quit := make(chan os.Signal)
quit := make(chan os.Signal, 1)
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)

// Start http server by facades.Route().
Expand Down
6 changes: 5 additions & 1 deletion routes/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ func Test() {
}

var query Query
ctx.Request().BindQuery(&query)
if err := ctx.Request().BindQuery(&query); err != nil {
return ctx.Response().Json(http.StatusBadRequest, http.Json{
"error": err.Error(),
})
}

return ctx.Response().Json(http.StatusOK, http.Json{
"name": query.Name,
Expand Down
2 changes: 1 addition & 1 deletion tests/services/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ func TestMain(m *testing.M) {

m.Run()

file.Remove("goravel")
_ = file.Remove("goravel")
}

0 comments on commit 98401c8

Please sign in to comment.