Skip to content

Commit

Permalink
feat: remove redundant application-wide dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kweeuhree committed Jan 2, 2025
1 parent 1621eaa commit d72563b
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions cmd/web/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ import (
type application struct {
errorLog *log.Logger
infoLog *log.Logger
// In-memory receipts storage
receiptStore *models.ReceiptStore
items *[]models.Item
handlers *handlers.Handlers
helpers *helpers.Helpers
utils *utils.Utils
handlers *handlers.Handlers
helpers *helpers.Helpers
}

// Main point of entry
Expand All @@ -40,13 +36,10 @@ func main() {

// Initialize the application with its dependencies
app := &application{
errorLog: errorLog,
infoLog: infoLog,
receiptStore: receiptStore,
items: &[]models.Item{},
handlers: handlers,
utils: utils,
helpers: helpers,
errorLog: errorLog,
infoLog: infoLog,
handlers: handlers,
helpers: helpers,
}

// HTTP server config
Expand Down

0 comments on commit d72563b

Please sign in to comment.