Skip to content

Commit

Permalink
feat: simplified code (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
binyellow authored May 4, 2022
1 parent 22d2e61 commit 687525f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ type User struct {

func main() {
port := os.Getenv("PORT")
r := gin.New()
r.Use(gin.Logger())
r.Use(gin.Recovery())
r := gin.Default()

if port == "" {
port = "8000"
Expand Down
4 changes: 1 addition & 3 deletions _example/basic/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ type User struct {

func main() {
port := os.Getenv("PORT")
r := gin.New()
r.Use(gin.Logger())
r.Use(gin.Recovery())
r := gin.Default()

if port == "" {
port = "8000"
Expand Down

0 comments on commit 687525f

Please sign in to comment.