fix(middleware):add middleware format
This commit is contained in:
parent
488d84580e
commit
2c6a6a6848
|
@ -1,5 +0,0 @@
|
|||
package log_middle
|
||||
|
||||
func wait() {
|
||||
|
||||
}
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue