优化项目结构

This commit is contained in:
liwei1dao 2022-06-01 09:27:35 +08:00
parent 7e3a66ff6d
commit 98a97f3ce7
4 changed files with 5 additions and 6 deletions

View File

@ -1,4 +1,4 @@
package m_comps package modules
import ( import (
"context" "context"

View File

@ -3,7 +3,7 @@ package web
import ( import (
"context" "context"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/modules/m_comps" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"github.com/liwei1dao/lego/core" "github.com/liwei1dao/lego/core"
@ -11,7 +11,7 @@ import (
) )
type User_Comp struct { type User_Comp struct {
m_comps.MComp_GateComp modules.MComp_GateComp
} }
func (this *User_Comp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { func (this *User_Comp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {

View File

@ -1,4 +1,4 @@
package s_comps package services
import ( import (
"context" "context"

View File

@ -4,7 +4,6 @@ import (
"flag" "flag"
"go_dreamfactory/modules/web" "go_dreamfactory/modules/web"
"go_dreamfactory/services" "go_dreamfactory/services"
"go_dreamfactory/services/s_comps"
"github.com/liwei1dao/lego" "github.com/liwei1dao/lego"
"github.com/liwei1dao/lego/base/rpcx" "github.com/liwei1dao/lego/base/rpcx"
@ -22,7 +21,7 @@ func main() {
rpcx.SetVersion("1.0.0.0"), rpcx.SetVersion("1.0.0.0"),
) )
s.OnInstallComp( //装备组件 s.OnInstallComp( //装备组件
s_comps.NewGateRouteComp(), services.NewGateRouteComp(),
) )
lego.Run(s, //运行模块 lego.Run(s, //运行模块
web.NewModule(), web.NewModule(),