Skip to content

Commit 16cf261

Browse files
author
QM303176530
committed
插件功能更新 修改插件包的实现方案
1 parent 0a0e32b commit 16cf261

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

server/core/server.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"gin-vue-admin/global"
66
"gin-vue-admin/initialize"
7+
"github.com/piexlmax/gvaplug"
78
"net/http"
89
"time"
910
)
@@ -17,10 +18,10 @@ func RunWindowsServer() {
1718
Router.Static("/form-generator", "./resource/page")
1819

1920
// 插件安装 暂时只是后台功能 添加model 添加路由 添加对数据库的操作 详细插件测试模板可看https://github.com/piexlmax/gvaplug 此处不建议投入生产
20-
//err := initialize.InstallPlug(global.GVA_DB, Router, gvaplug.GvaPlug{})
21-
//if err != nil {
22-
// panic(fmt.Sprintf("插件安装失败: %v", err))
23-
//}
21+
err := initialize.InstallPlug(global.GVA_DB, Router, gvaplug.GvaPlug{})
22+
if err != nil {
23+
panic(fmt.Sprintf("插件安装失败: %v", err))
24+
}
2425
// end 插件描述
2526

2627
address := fmt.Sprintf(":%d", global.GVA_CONFIG.System.Addr)

server/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ require (
3030
github.com/onsi/gomega v1.4.3 // indirect
3131
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
3232
github.com/pelletier/go-toml v1.6.0 // indirect
33-
github.com/piexlmax/gvaplug v0.0.5
33+
github.com/piexlmax/gvaplug v0.0.7
3434
github.com/pkg/errors v0.9.1 // indirect
3535
github.com/qiniu/api.v7 v7.2.5+incompatible
3636
github.com/qiniu/x v7.0.8+incompatible // indirect

0 commit comments

Comments
 (0)