Skip to content

Commit

Permalink
fix(repository): mysql -> dbms
Browse files Browse the repository at this point in the history
  • Loading branch information
mcauto committed Dec 4, 2021
1 parent 302a03b commit 61e2a70
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions modules/delivery/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"todolist-api/modules/domains"
"todolist-api/modules/domains/todo"
"todolist-api/modules/repository"
"todolist-api/modules/repository/_mysql"
"todolist-api/modules/repository/_dbms"

"github.com/spf13/cobra"
"go.uber.org/fx"
Expand All @@ -19,7 +19,7 @@ var runCmd = &cobra.Command{
Version: config.AppVersion,
Short: fmt.Sprintf("%s Run", config.AppName),
Run: func(cmd *cobra.Command, args []string) {
f := func(repo *_mysql.Repository) {
f := func(repo *_dbms.Repository) {
if err := repo.AutoMigrate(&todo.Item{}); err != nil {
log.Fatal(err)
}
Expand Down
6 changes: 3 additions & 3 deletions modules/domains/todo/service.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package todo

import (
"todolist-api/modules/repository/_mysql"
"todolist-api/modules/repository/_dbms"
)

// Service 인터페이스
Expand All @@ -15,11 +15,11 @@ type Service interface {

// ServiceImpl 구현체
type ServiceImpl struct {
repo *_mysql.Repository
repo *_dbms.Repository
}

// NewService 생성자
func NewService(repo *_mysql.Repository) Service {
func NewService(repo *_dbms.Repository) Service {
return &ServiceImpl{repo}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package _mysql
package _dbms

import (
"log"
Expand Down
4 changes: 2 additions & 2 deletions modules/repository/modules.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package repository

import (
"todolist-api/modules/repository/_mysql"
"todolist-api/modules/repository/_dbms"

"go.uber.org/fx"
)

// Modules is a list of all modules
var Modules = fx.Options(fx.Provide(_mysql.NewRepository))
var Modules = fx.Options(fx.Provide(_dbms.NewRepository))

0 comments on commit 61e2a70

Please sign in to comment.