From e0588bb842087ff3b9d89c6b9ba1ac61e4f6c237 Mon Sep 17 00:00:00 2001 From: Liangzhao Che Date: Thu, 1 Jun 2023 18:07:58 +0800 Subject: [PATCH] refactor: rename data repository --- internal/bill/repository.go | 2 +- internal/infrastructure/fiber.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/bill/repository.go b/internal/bill/repository.go index d5f429d..57dc7a1 100644 --- a/internal/bill/repository.go +++ b/internal/bill/repository.go @@ -9,7 +9,7 @@ type sqliteRepository struct { db *gorm.DB } -func NewDatabaseRepository(db *gorm.DB) BillRepository { +func NewBillRepository(db *gorm.DB) BillRepository { return &sqliteRepository{ db: db, } diff --git a/internal/infrastructure/fiber.go b/internal/infrastructure/fiber.go index 3bbc876..56998dc 100644 --- a/internal/infrastructure/fiber.go +++ b/internal/infrastructure/fiber.go @@ -54,7 +54,7 @@ func Run() { // Create repositories. //cityRepository := city.NewCityRepository(mariadb) //userRepository := user.NewUserRepository(mariadb) - billRepository := bill.NewDatabaseRepository(sqlite) + billRepository := bill.NewBillRepository(sqlite) // Create all of our services. //cityService := city.NewCityService(cityRepository)