Skip to content

Commit

Permalink
reduce duplicate in Get method (gofiber#1880)
Browse files Browse the repository at this point in the history
make code more clear to people!
  • Loading branch information
ajf-sa authored and trim21 committed Aug 15, 2022
1 parent ccc13df commit aa3b9bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.go
Expand Up @@ -640,7 +640,7 @@ func (app *App) Use(args ...interface{}) Router {
// Get registers a route for GET methods that requests a representation
// of the specified resource. Requests using GET should only retrieve data.
func (app *App) Get(path string, handlers ...Handler) Router {
return app.Add(MethodHead, path, handlers...).Add(MethodGet, path, handlers...)
return app.Head(path, handlers...).Add(MethodGet, path, handlers...)
}

// Head registers a route for HEAD methods that asks for a response identical
Expand Down

0 comments on commit aa3b9bd

Please sign in to comment.