diff --git a/middleware/log-middle/kbl.go b/middleware/log-middle/kbl.go deleted file mode 100644 index 4f95f3c..0000000 --- a/middleware/log-middle/kbl.go +++ /dev/null @@ -1,5 +0,0 @@ -package log_middle - -func wait() { - -} diff --git a/pkg/middle/define.go b/pkg/middle/define.go index 1fc688a..a74bd76 100644 --- a/pkg/middle/define.go +++ b/pkg/middle/define.go @@ -1,7 +1,7 @@ package middle -import middleConf "gitee.com/timedb/wheatCache/middleware/config" +import getMiddlewareMap "gitee.com/timedb/wheatCache/middleware/config" -func init() { - middleConf.GetMiddlewareMap() +func Init() { + getMiddlewareMap.GetMiddlewareMap() } diff --git a/shell/gen_middleware.py b/shell/gen_middleware.py index 976e312..df56692 100644 --- a/shell/gen_middleware.py +++ b/shell/gen_middleware.py @@ -51,17 +51,23 @@ def getMiddleDir(keys:list)->list: dirs.append(middleware) return dirs +def format_code_go(): + go_fmt(f"{middlePath}/config/middle.gen.go") +def set_middle_server(): -if __name__ == "__main__": - tem_text = load_template("middle.template") temp = Template(tem_text) keys = getMiddleName(middlePath) dirs = getMiddleDir(keys) - text = temp.render(dirs=dirs,) + text = temp.render(dirs=dirs) temp_path = f"{middlePath}/config/middle.gen.go" with open(temp_path,'w',encoding='utf-8') as f: f.write(text) + + +if __name__ == "__main__": + set_middle_server() + format_code_go()