forked from p93542168/wheat-cache
commit
a556840f9b
|
@ -5,7 +5,7 @@ package structure
|
||||||
|
|
||||||
const (
|
const (
|
||||||
DEFAULT_KEY = iota
|
DEFAULT_KEY = iota
|
||||||
{% for key in keys -%}
|
{% for key in keys %}
|
||||||
{{key}}
|
{{key}}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,10 +10,6 @@ import (
|
||||||
"gitee.com/timedb/wheatCache/pkg/proto"
|
"gitee.com/timedb/wheatCache/pkg/proto"
|
||||||
"gitee.com/timedb/wheatCache/pkg/structure"
|
"gitee.com/timedb/wheatCache/pkg/structure"
|
||||||
|
|
||||||
{% for name in mod_name %}
|
|
||||||
"gitee.com/timedb/wheatCache/pkg/structure/{{name}}"
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ def mk_structure(cfg_camel):
|
||||||
file.write('syntax = "proto3";\nimport "base.proto";\noption go_package = "pkg/proto";\n')
|
file.write('syntax = "proto3";\nimport "base.proto";\noption go_package = "pkg/proto";\n')
|
||||||
for v in value:
|
for v in value:
|
||||||
file.write('\nmessage ' + v + 'Request ' + '{\n BaseKey key = 1;\n}\n')
|
file.write('\nmessage ' + v + 'Request ' + '{\n BaseKey key = 1;\n}\n')
|
||||||
|
file.write('\nmessage ' + v + 'Response ' + '{\n int64 update_size = 1;\n}\n')
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
else: # 如果这个文件存在
|
else: # 如果这个文件存在
|
||||||
|
|
Loading…
Reference in New Issue