Skip to content

Commit

Permalink
🚠 Move requestlog into middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
dumindu committed Jan 20, 2024
1 parent 8d1738b commit d95f4dc
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,26 @@ myapp
│ └── main.go
├── api
│ ├── router
│ │ └── router.go
│ ├── resource
│ │ ├── book
│ │ │ ├── handler.go
│ │ │ ├── model.go
│ │ │ ├── repository.go
│ │ │ └── repository_test.go
│ │ ├── common
│ │ │ └── err
│ │ │ └── err.go
│ │ └── health
│ │ └── handler.go
│ │
│ └── resource
│ ├── health
│ │ └── handler.go
│ ├── book
│ │ ├── api.go
│ │ ├── handler.go
│ │ ├── model.go
│ │ └── repository.go
│ └── common
│ └── err
│ └── err.go
│ └── router
│ ├── middleware
│ │ ├── content_type_json.go
│ │ ├── content_type_json_test.go
│ │ └── requestlog
│ │ ├── handler.go
│ │ └── log_entry.go
│ └── router.go
├── migrations
│ └── 00001_create_books_table.sql
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion api/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"github.com/rs/zerolog"
"gorm.io/gorm"

"myapp/api/requestlog"
"myapp/api/resource/book"
"myapp/api/resource/health"
"myapp/api/router/middleware"
"myapp/api/router/middleware/requestlog"
)

func New(l *zerolog.Logger, v *validator.Validate, db *gorm.DB) *chi.Mux {
Expand Down

0 comments on commit d95f4dc

Please sign in to comment.