From ea36d370a77aa241eeb87f7fee9c548d731d6645 Mon Sep 17 00:00:00 2001 From: Sodesnei <1452401269@qq.com> Date: Mon, 4 Oct 2021 20:04:28 +0800 Subject: [PATCH] fix(middle-driver): update file name --- {middleware => plugins}/config/middle.gen.go | 7 ++++--- {middleware => plugins}/config/middle.template | 4 ++-- {middleware => plugins}/define.go | 0 {middleware => plugins}/log-middle/middleware.go | 0 {middleware => plugins}/map-key/middleware.go | 0 shell/gen_middleware.py | 4 ++-- 6 files changed, 8 insertions(+), 7 deletions(-) rename {middleware => plugins}/config/middle.gen.go (66%) rename {middleware => plugins}/config/middle.template (77%) rename {middleware => plugins}/define.go (100%) rename {middleware => plugins}/log-middle/middleware.go (100%) rename {middleware => plugins}/map-key/middleware.go (100%) diff --git a/middleware/config/middle.gen.go b/plugins/config/middle.gen.go similarity index 66% rename from middleware/config/middle.gen.go rename to plugins/config/middle.gen.go index 10bc962..cb9323d 100644 --- a/middleware/config/middle.gen.go +++ b/plugins/config/middle.gen.go @@ -4,9 +4,10 @@ package config import ( - "gitee.com/timedb/wheatCache/middleware" - logMiddle "gitee.com/timedb/wheatCache/middleware/log-middle" - mapKey "gitee.com/timedb/wheatCache/middleware/map-key" + "gitee.com/timedb/wheatCache/plugins" + + logMiddle "gitee.com/timedb/wheatCache/plugins/log-middle" + mapKey "gitee.com/timedb/wheatCache/plugins/map-key" ) func GetMiddlewareMap() map[string]middleware.MiddleToolsInterface { diff --git a/middleware/config/middle.template b/plugins/config/middle.template similarity index 77% rename from middleware/config/middle.template rename to plugins/config/middle.template index 5bcbc70..1f6d411 100644 --- a/middleware/config/middle.template +++ b/plugins/config/middle.template @@ -4,9 +4,9 @@ package config import ( - "gitee.com/timedb/wheatCache/middleware" + "gitee.com/timedb/wheatCache/plugins" {%for dir in dirs %} - {{dir[0]}} "gitee.com/timedb/wheatCache/middleware/{{dir[1]}}" + {{dir[0]}} "gitee.com/timedb/wheatCache/plugins/{{dir[1]}}" {%- endfor%} ) diff --git a/middleware/define.go b/plugins/define.go similarity index 100% rename from middleware/define.go rename to plugins/define.go diff --git a/middleware/log-middle/middleware.go b/plugins/log-middle/middleware.go similarity index 100% rename from middleware/log-middle/middleware.go rename to plugins/log-middle/middleware.go diff --git a/middleware/map-key/middleware.go b/plugins/map-key/middleware.go similarity index 100% rename from middleware/map-key/middleware.go rename to plugins/map-key/middleware.go diff --git a/shell/gen_middleware.py b/shell/gen_middleware.py index df56692..64ef162 100644 --- a/shell/gen_middleware.py +++ b/shell/gen_middleware.py @@ -3,11 +3,11 @@ from jinja2 import Template sysPath = os.getcwd() -tempPath = f"{sysPath}/middleware/config" +tempPath = f"{sysPath}/plugins/config" structurePath = f"{sysPath}/pkg/structure" protobufPath = f"{sysPath}/protobuf" storagePath = f"{sysPath}/storage" -middlePath = f"{sysPath}/middleware" +middlePath = f"{sysPath}/plugins" def go_fmt(path: str): os.system(f"go fmt {path}")