modify app to atom

This commit is contained in:
yanghao05
2023-01-28 11:11:12 +08:00
parent 19562329ed
commit be06e1f1e3
19 changed files with 53 additions and 53 deletions

View File

@@ -1,11 +1,11 @@
package cmd
import (
_ "app/providers"
_ "atom/providers"
"app/container"
"app/services/http"
"app/utils"
"atom/container"
"atom/services/http"
"atom/utils"
"fmt"
"os"

2
go.mod
View File

@@ -1,4 +1,4 @@
module app
module atom
go 1.18

View File

@@ -1,7 +1,7 @@
package main
import (
"app/cmd"
"atom/cmd"
)
func main() {

View File

@@ -1,5 +1,5 @@
package modules
import (
_ "app/modules/system/container"
_ "atom/modules/system/container"
)

View File

@@ -1,11 +1,11 @@
package container
import (
"app/container"
"app/modules/system/controller"
"app/modules/system/dao"
"app/modules/system/routes"
"app/modules/system/service"
"atom/container"
"atom/modules/system/controller"
"atom/modules/system/dao"
"atom/modules/system/routes"
"atom/modules/system/service"
"log"
"go.uber.org/dig"

View File

@@ -1,10 +1,10 @@
package controller
import (
"app/modules/system/dao"
"app/modules/system/dto"
"app/modules/system/service"
"app/providers/config"
"atom/modules/system/dao"
"atom/modules/system/dto"
"atom/modules/system/service"
"atom/providers/config"
"github.com/gin-gonic/gin"
)

View File

@@ -1,7 +1,7 @@
package dao
import (
"app/providers/config"
"atom/providers/config"
"context"
"errors"

View File

@@ -1,9 +1,9 @@
package routes
import (
"app/contracts"
"app/modules/system/controller"
"app/providers/http"
"atom/contracts"
"atom/modules/system/controller"
"atom/providers/http"
"github.com/rogeecn/gen"
)

View File

@@ -1,8 +1,8 @@
package service
import (
"app/modules/system/dao"
"app/modules/system/dto"
"atom/modules/system/dao"
"atom/modules/system/dto"
"context"
)

View File

@@ -1,16 +1,16 @@
package system
import (
"app/container"
"atom/container"
"context"
"fmt"
"testing"
_ "app/providers/config" // 这里的依赖需要被导入,否则会报错
_ "app/providers/logger"
_ "app/providers/mysql"
_ "app/web/system/container"
"app/web/system/service"
_ "atom/modules/system/container"
"atom/modules/system/service"
_ "atom/providers/config" // 这里的依赖需要被导入,否则会报错
_ "atom/providers/logger"
_ "atom/providers/mysql"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"

View File

@@ -1,8 +1,8 @@
package config
import (
"app/container"
"app/utils"
"atom/container"
"atom/utils"
"log"
"os"
"strings"

View File

@@ -1,6 +1,6 @@
package config
import "app/utils"
import "atom/utils"
type App struct {
Mode string

View File

@@ -1,9 +1,9 @@
package http
import (
"app/container"
"app/providers/config"
"app/providers/logger"
"atom/container"
"atom/providers/config"
"atom/providers/logger"
"fmt"
"log"
"time"

View File

@@ -1,8 +1,8 @@
package logger
import (
"app/container"
"app/providers/config"
"atom/container"
"atom/providers/config"
"log"
"strings"

View File

@@ -1,9 +1,9 @@
package micro
import (
"app/container"
"app/providers/config"
"app/utils"
"atom/container"
"atom/providers/config"
"atom/utils"
"log"
mgrpc "github.com/go-micro/plugins/v4/client/grpc"

View File

@@ -1,7 +1,7 @@
package mysql
import (
"app/container"
"atom/container"
"gorm.io/gorm"
)

View File

@@ -1,9 +1,9 @@
package providers
import (
_ "app/providers/config"
_ "app/providers/http"
_ "app/providers/logger"
_ "app/providers/micro"
_ "app/providers/mysql"
_ "atom/providers/config"
_ "atom/providers/http"
_ "atom/providers/logger"
_ "atom/providers/micro"
_ "atom/providers/mysql"
)

View File

@@ -3,8 +3,8 @@ package rpc
import (
"log"
"app/container"
"app/proto"
"atom/container"
"atom/proto"
"go-micro.dev/v4"
)

View File

@@ -1,12 +1,12 @@
package http
import (
_ "app/modules"
_ "atom/modules"
"app/contracts"
"app/providers/config"
"app/providers/http"
"app/providers/logger"
"atom/contracts"
"atom/providers/config"
"atom/providers/http"
"atom/providers/logger"
"go.uber.org/dig"
)