mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Rework db package to make it testable
This commit is contained in:
@@ -9,12 +9,12 @@ import (
|
||||
|
||||
// Handler provides common functionality for all handlers
|
||||
type Handler struct {
|
||||
DB *db.DB
|
||||
DB db.Database
|
||||
Storage storage.Manager
|
||||
}
|
||||
|
||||
// NewHandler creates a new handler with the given dependencies
|
||||
func NewHandler(db *db.DB, s storage.Manager) *Handler {
|
||||
func NewHandler(db db.Database, s storage.Manager) *Handler {
|
||||
return &Handler{
|
||||
DB: db,
|
||||
Storage: s,
|
||||
|
||||
Reference in New Issue
Block a user