modify app to atom
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package modules
|
||||
|
||||
import (
|
||||
_ "app/modules/system/container"
|
||||
_ "atom/modules/system/container"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"app/providers/config"
|
||||
"atom/providers/config"
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"app/modules/system/dao"
|
||||
"app/modules/system/dto"
|
||||
"atom/modules/system/dao"
|
||||
"atom/modules/system/dto"
|
||||
"context"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
@@ -45,7 +45,7 @@ func (s *TServiceSuite) Test_GetName() {
|
||||
assert.Equal(s.T(), "System.GetName", name.Name)
|
||||
}
|
||||
|
||||
//////
|
||||
// ////
|
||||
func (s *TServiceSuite) SetupSuite() {
|
||||
fmt.Println("SetupSuite")
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"app/container"
|
||||
"app/utils"
|
||||
"atom/container"
|
||||
"atom/utils"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package config
|
||||
|
||||
import "app/utils"
|
||||
import "atom/utils"
|
||||
|
||||
type App struct {
|
||||
Mode string
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package logger
|
||||
|
||||
import (
|
||||
"app/container"
|
||||
"app/providers/config"
|
||||
"atom/container"
|
||||
"atom/providers/config"
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package mysql
|
||||
|
||||
import (
|
||||
"app/container"
|
||||
"atom/container"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -3,8 +3,8 @@ package rpc
|
||||
import (
|
||||
"log"
|
||||
|
||||
"app/container"
|
||||
"app/proto"
|
||||
"atom/container"
|
||||
"atom/proto"
|
||||
|
||||
"go-micro.dev/v4"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user