From ad088f85c40384602ad9f74fcd4d5a8d2b431e57 Mon Sep 17 00:00:00 2001 From: aaron <462826@qq.com> Date: Thu, 28 May 2020 17:55:28 +0800 Subject: [PATCH] fix a issue when provide yaml with -d --- conf/zdata.conf | 3 - data/system/ip/v1.yaml | 2 + demo/base.yaml | 2 +- demo/inherit.yaml | 4 ++ demo/numb.yaml | 2 +- demo/test.yaml | 7 +- res/doc/sample.txt | 20 +++--- res/doc/usage.txt | 26 ++++---- res/res.go | 8 +-- src/action/config.go | 7 -- src/action/generator.go | 18 +++--- src/gen/definition.go | 20 ++++-- src/gen/generator.go | 22 +++---- src/gen/res.go | 4 +- src/utils/config/config.go | 127 ------------------------------------- src/utils/log/print.go | 4 +- src/utils/vari/vari.go | 2 +- src/zd.go | 6 -- 18 files changed, 76 insertions(+), 208 deletions(-) delete mode 100644 conf/zdata.conf delete mode 100644 src/action/config.go diff --git a/conf/zdata.conf b/conf/zdata.conf deleted file mode 100644 index 24b9b79..0000000 --- a/conf/zdata.conf +++ /dev/null @@ -1,3 +0,0 @@ -Version = 1 -Language = zh - diff --git a/data/system/ip/v1.yaml b/data/system/ip/v1.yaml index 4a88e4e..e887b2b 100644 --- a/data/system/ip/v1.yaml +++ b/data/system/ip/v1.yaml @@ -7,6 +7,8 @@ field: ip instances: - instance: privateC prefix: 192.168. + loop: 2 + loopfix: "-" fields: - field: part3 range: 0-254 diff --git a/demo/base.yaml b/demo/base.yaml index cfa4401..786777b 100644 --- a/demo/base.yaml +++ b/demo/base.yaml @@ -8,7 +8,7 @@ fields: note: 引用同级目录中的yaml文件,取small和large两个分组的值 from: numb.yaml use: small,large - loop: 3 + loop: 2 loopfix: "|" prefix: "[" postfix: "]" \ No newline at end of file diff --git a/demo/inherit.yaml b/demo/inherit.yaml index 4948f2c..b30dc83 100644 --- a/demo/inherit.yaml +++ b/demo/inherit.yaml @@ -5,3 +5,7 @@ version: 1.0 fields: - field: field1 + loop: 2 + loopfix: " " + prefix: "{" + postfix: "}" \ No newline at end of file diff --git a/demo/numb.yaml b/demo/numb.yaml index de531ea..2e786a3 100644 --- a/demo/numb.yaml +++ b/demo/numb.yaml @@ -7,7 +7,7 @@ field: number prefix: "'" postfix: "'" loop: 2 -loopfix: "." +loopfix: "-" ranges: small: 1-9 medium: 11-99 diff --git a/demo/test.yaml b/demo/test.yaml index a39f0e3..2e2901b 100644 --- a/demo/test.yaml +++ b/demo/test.yaml @@ -13,14 +13,17 @@ fields: from: numb.yaml use: small,large loop: 3 - loopfix: "-" - postfix: "," + loopfix: " " + postfix: " " expect: 1,2,3,101,102... - field: field2 note: 引用內置IP地址数据定义中的C类地址 from: system.ip.v1.yaml use: privateC + prefix: _ + loop: 3 + loopfix: " " expect: 192.168.0.1 ...​ - field: field3 diff --git a/res/doc/sample.txt b/res/doc/sample.txt index 9bd4e60..4ac0cd5 100644 --- a/res/doc/sample.txt +++ b/res/doc/sample.txt @@ -1,15 +1,13 @@ - $>zd.exe -s 根据系统提示,设置工具语言等属性。 + $>zd.exe -h 查看使用帮助。 - $>zd.exe -h 查看使用帮助。 + $>zd.exe -y demo/test.yaml -c 15 -field field1 -o demo/output.txt -f text + 执行数据生成命令。使用配置文件demo/test.yaml,生成15行数据,以text格式的输出到demo/output.txt文件中。 - $>zd.exe -y demo/test.yaml -c 15 -field field1 -o demo/output.txt -f text - 执行数据生成命令。使用配置文件demo/test.yaml,生成15行数据,以text格式的输出到demo/output.txt文件中。 + $>zd.exe -y demo/test.yaml -c 15 -field field1 -o demo/insert.sql -f sql -t table_name + 执行数据生成命令。以SQL语句形式输出到demo/insert.sql文件中,表名为table_name。 - $>zd.exe -y demo/test.yaml -c 15 -field field1 -o demo/insert.sql -f sql -t table_name - 执行数据生成命令。以SQL语句形式输出到demo/insert.sql文件中,表名为table_name。 + $>zd.exe -d demo/base.yaml -y demo/test.yaml -c 15 -field field1 -o demo/output.txt + 执行数据生成命令。使用文件demo/test.yam覆盖默认配置demo/common.yaml中的内容。 - $>zd.exe -d demo/base.yaml -y demo/test.yaml -c 15 -field field1 -o demo/output.txt - 执行数据生成命令。使用文件demo/test.yam覆盖默认配置demo/common.yaml中的内容。 - - $>zd.exe -i xdoc/test/zentao.sql -o out - 从指定的数据库Schema,创建yaml定义文件,输出到out目录下。 \ No newline at end of file + $>zd.exe -i xdoc/test/zentao.sql -o out + 从指定的数据库Schema,创建yaml定义文件,输出到out目录下。 \ No newline at end of file diff --git a/res/doc/usage.txt b/res/doc/usage.txt index 3e72bba..203fa5e 100644 --- a/res/doc/usage.txt +++ b/res/doc/usage.txt @@ -1,15 +1,15 @@ - -h --help 查看帮助信息。 - -s --set 设置工具语言属性。用户对当前目录需要有写权限。 + -h --help 查看帮助信息。 + -s --set 设置工具语言属性。用户对当前目录需要有写权限。 - 默认根据定义文件生成数据。 - -d --default 默认定义文件 - -y --yaml 指定定义文件 - -c --count 指定生成数据的条数 - --field 需要输出的字段,用逗号分隔。未指定时,默认输出-yaml文件中的所有字段。 - -o --out 指定输出文件 - -f --format 输出格式,支持text、json、xml和sql语句,默认为text。 - -t --table 输出格式为table时,用于指定insert语句的表名 - --verbose 增加此参数,显示详细调试信息。 + 默认根据定义文件生成数据。 + -d --default 默认定义文件 + -y --yaml 指定定义文件 + -c --count 指定生成数据的条数 + --field 需要输出的字段,用逗号分隔。未指定时,默认输出-yaml文件中的所有字段。 + -o --out 指定输出文件 + -f --format 输出格式,支持text、json、xml和sql语句,默认为text。 + -t --table 输出格式为table时,用于指定insert语句的表名 + --verbose 增加此参数,显示详细调试信息。 - 为了方便在任意目录中执行%s命令,建议将其加入环境变量中,具体方法参照以下地址。 - https://www.ztesting.net/book/ztf-doc/add-to-path-46.html \ No newline at end of file + 为了方便在任意目录中执行%s命令,建议将其加入环境变量中,具体方法参照以下地址。 + https://www.ztesting.net/book/ztf-doc/add-to-path-46.html \ No newline at end of file diff --git a/res/res.go b/res/res.go index 9462af0..067a9ae 100644 --- a/res/res.go +++ b/res/res.go @@ -25,7 +25,7 @@ func bindata_read(data []byte, name string) ([]byte, error) { return buf.Bytes(), nil } -var _res_doc_sample_txt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x91\x4f\x6e\xd3\x40\x14\xc6\xf7\x9c\xe2\x2d\xd8\x3a\x55\x16\xdd\x72\x09\x0e\x80\x4c\x3c\x55\x2b\xd9\x19\x2a\x8f\x25\xb7\x2b\x2b\x6a\xda\x94\x3a\x34\xa8\x7f\x84\x12\x44\x5a\x29\xa1\x61\x91\xa1\x08\x89\x3a\x1e\xbb\x1c\x26\xf3\x66\xdc\x55\xae\x80\x9c\x81\x20\x27\xec\xf0\xc2\xab\x79\xdf\xfb\xfd\xbe\x07\x00\xcf\x5f\x1c\x3a\x35\x12\x12\xb0\x7c\x50\x37\x33\xd5\xe5\xfa\xbb\xd0\x62\xa8\xce\x7b\x7a\x94\x2e\xb2\xb8\xe0\x8f\x3a\xe7\xf8\x30\xc6\xf6\x43\xf1\x75\x5a\x4c\x22\xfc\xf6\x49\x45\x77\xf3\xa8\xf5\xac\x32\xbf\x0b\x6a\x38\xd6\x1f\xcf\x64\xfe\x53\x5f\x4e\x30\xe1\xf8\xf6\xcb\xc6\xa3\x03\x70\x88\x47\xb7\x18\xf1\x59\xed\xc0\xf6\x5c\xb0\x1a\x50\xdf\x06\x6b\x67\x8f\xb8\x0e\x2c\xff\x75\xb0\xa8\x79\x45\x03\xf6\x26\x60\x35\x16\x32\xb0\x76\x80\x91\x90\x95\x61\xab\x4f\x9d\xde\x15\xb7\xb1\xba\xba\x2f\xa1\x2f\x87\xaa\xd3\xc3\xf7\xb9\x14\xa3\x79\xd4\x32\x0c\x4f\xed\xae\xce\xb9\xba\x3e\x91\xe2\x47\x75\xed\x22\x8b\xcd\x44\x7d\x7b\x15\xb1\xc8\x62\x29\xc6\xe5\x16\x75\x93\x61\x76\xae\xfb\x47\xc5\xe3\x05\x9e\xa4\xd8\xb9\x5f\xc3\x31\x91\x32\x99\x6e\xf8\x39\x86\xbc\x41\x3d\x8f\x36\x7f\x1b\xfe\x87\xb3\xbf\xef\x82\xc5\x80\xd9\xaf\x5d\xf2\xaa\x69\x7b\xa4\x52\x80\x51\xf0\xf7\xdd\x35\xe0\xf2\x6a\xb7\x13\xec\x75\x65\x92\xfe\x1d\x5d\xd5\xf2\x8f\x42\x8a\xcf\xc7\x7a\x70\xfd\x24\x3e\x14\x7c\x64\x5a\x5b\xd7\x90\xc9\x54\xf7\x8f\xf0\xb8\x8d\x7c\xb6\x61\xbd\x07\xa1\x43\x1b\xcb\xb4\xad\x43\xd2\x64\x36\xad\x2d\xc9\x29\xd0\xa0\x7a\x33\x29\xde\x99\xb6\x31\xbd\x78\xd9\xd8\x25\x9e\x8d\x9d\x01\x8a\xb4\x5c\x81\xbc\x2f\x67\xa7\x86\xae\x54\xf8\x53\x3e\x0d\x98\x1e\x70\xcc\xaf\x64\x72\x36\x8f\x5a\xbf\x02\x00\x00\xff\xff\xe2\x1d\xed\x8f\xb5\x02\x00\x00") +var _res_doc_sample_txt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x91\xcd\x6e\xda\x40\x14\x85\xf7\x79\x8a\xbb\xe8\xd6\x44\x59\x64\xdb\x27\xe8\xa6\xca\x03\x54\x0e\x9e\x28\x48\x98\x69\xeb\x41\x22\x59\x59\x08\x02\x34\xa6\x50\xe5\x47\x95\xa9\x4a\x52\xe1\x86\x2e\x3c\x49\x55\xa9\x31\xfe\x49\x1f\x86\xb9\x33\xce\x8a\x57\xa8\x6c\xb7\x44\x44\x2c\xfa\xe3\x85\x67\x31\x77\xce\xf9\xce\x3d\x00\x00\x4f\x9e\x1e\x1a\x25\xd2\x20\xa0\x59\x20\x2f\x66\xb2\xcf\xd5\xb7\x48\x45\x63\x39\x18\xaa\x49\xb8\x88\x9d\x94\xdf\xa9\x84\xe3\xad\x87\xed\xdb\xf4\xda\x4f\xa7\xb6\xf2\x7b\xf8\xf5\xa3\xb4\xaf\xe6\x76\x73\x63\x63\x55\x64\x1f\xe4\xd8\x53\x1f\x8e\x45\xf2\x43\x9d\x4e\x31\xe0\xf8\xe6\xcb\x9a\xb1\x03\x30\x88\x49\x37\x19\xb1\x58\xe9\x40\x37\xab\xa0\x95\x61\x6b\x1b\xb4\xbd\x0a\xa9\x1a\x90\xff\xb7\x40\xa3\xc5\x14\xad\xb3\x97\x75\x56\x62\x0d\x06\xda\x1e\x30\xd2\x60\xb9\xda\xf2\x93\xbd\xab\xf4\xd2\x91\x67\x37\x19\xfc\xe9\x58\x76\x87\xf8\x2e\x11\xd1\x64\x6e\x37\x0b\x8c\xfb\x76\x5f\x25\x5c\x9e\x77\x44\xf4\x7d\xd5\x77\x11\x3b\xc5\x8b\xad\xed\xa5\xc4\x22\x76\x44\xe4\x65\x36\xf2\x22\xc6\x78\xa0\xdc\x56\x7a\x77\x82\x9d\x10\xbb\x37\x8f\x78\x0a\x49\x11\xf8\xff\x1b\xb1\x52\xb3\xc8\x6b\x56\xb2\x5e\x55\xb3\x88\xf9\xc1\x80\xe9\xbb\x55\xf2\xa2\xa6\x9b\xe4\xcf\xf3\x46\xde\xce\xf3\x67\xe9\xb5\x8f\x03\x0f\x93\x4f\x18\x0f\x56\xd1\x1f\x7c\x96\xe8\x59\xc5\x97\x53\x1c\xf6\x45\x10\x3e\x38\xae\x09\x64\x14\xa8\xbb\xba\x45\x7e\x05\xfa\xc7\x16\xff\xb2\xbd\x35\xbd\xa5\x9f\x8f\xd4\xe8\xfc\x3e\x7a\x9f\xf2\x49\x51\x6e\x7e\x5d\xa6\xa6\x49\x6b\x39\x8a\x08\x7c\xe5\xb6\xf0\xa8\x8d\x7c\xb6\x26\x4b\x05\x1a\x06\x2d\xe7\x7a\x9b\x87\xa4\xc6\x74\x5a\xec\x9e\x02\xad\x3f\xe2\x13\xd1\x5b\xe9\x74\x90\xbb\xca\x6d\x15\x94\x18\x9e\xec\x94\xf7\x89\xa9\x2f\x62\x07\xbb\x23\x8c\xc2\xcc\x11\xb9\x2b\x66\xbd\x02\x36\xdb\xe9\xef\xbd\xd3\x3a\x53\x23\x8e\xc9\x99\x08\x8e\xe7\x76\xf3\x67\x00\x00\x00\xff\xff\xe0\xee\xff\x52\x74\x03\x00\x00") func res_doc_sample_txt() ([]byte, error) { return bindata_read( @@ -43,7 +43,7 @@ func res_doc_usage_txt() ([]byte, error) { ) } -var _res_messages_en_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x94\x41\x6f\xdb\x3e\x0c\xc5\xef\xf9\x14\x84\x81\xa0\x97\xfc\x03\xfc\xb7\x9b\x8f\x2b\xba\x61\xc0\x2e\x6b\xb7\xd3\x3a\x08\xaa\x4c\x3b\x02\x1c\x2a\x11\xe9\x25\x41\xd1\xef\x3e\x50\xb6\xb7\x62\x88\x6c\x6f\x97\x1c\xac\x9f\xde\x23\x1f\xc5\x3c\xaf\x00\x8a\xd6\x52\xd3\xd9\x06\x8b\x12\x0a\xa4\xff\xbe\x3e\x14\x1b\xfd\xbc\x47\x66\xdb\x20\x17\x25\x7c\x5b\x01\x00\x3c\xa7\x5f\x80\xc2\x57\x8a\xd6\x21\x1a\x3c\xdb\xfd\xa1\xc5\x74\x21\x1d\x49\xb4\xc4\xad\x15\x1f\x28\xc9\x6d\x9b\x2d\xac\xb9\x48\xc7\x2f\x9b\x6b\x32\x12\xc4\xb6\x59\x81\x2f\xe9\x74\xbc\x7e\xed\xfe\x13\x36\x9e\x8c\x0b\x54\xfb\x26\x2b\xf3\x4e\x21\x90\x00\x3d\xb7\x01\xb9\x1c\x10\x6e\xf0\xec\xe5\x46\x3f\x1f\x3b\x2f\xdb\xa9\x2a\x91\x04\xa3\xf9\x95\x54\xce\xe7\x4e\x31\x90\x1d\xc2\x88\xc2\x25\x74\x70\xb2\x24\x6a\xd3\x31\x96\x8f\xf4\xff\x16\xee\xa8\x69\x3d\xef\x60\xcd\x8f\xf4\x66\x0b\xb7\x3b\x4f\xc8\x38\x93\x94\xeb\x62\x44\x92\xb9\x5e\x6f\x7b\x6c\x68\xb5\x9c\x0c\x8f\x3b\xe7\x90\xd9\x48\x30\x11\x6d\x95\xd5\x1c\x38\xed\x41\x39\xa8\x7d\x3b\x57\x6d\x6d\x7d\x3b\xea\x1a\xe5\xb3\xe2\xef\xad\x6f\xff\x54\x9e\x1c\xc6\x28\x7d\xb0\x91\x71\x99\x76\x42\xd3\x60\x5c\x20\xd1\x78\x42\xfd\x0f\x5e\xd1\x92\x6e\x44\xce\x6d\xcd\xe0\x19\x28\x08\xdc\x23\xdf\x27\x16\xea\x10\xf7\x56\x36\x20\xf1\xf2\xbb\x10\xcb\x4a\x7c\x24\x96\x57\xee\xd7\xec\x1b\x24\x8c\x56\xd0\x44\x74\x21\x56\x79\xeb\x0f\x03\x08\xeb\x0a\x06\x56\xed\x86\x16\x37\xc0\x07\xa4\x4a\x0f\x19\xdd\xb2\x8e\x5d\x20\x42\x27\x86\x8f\xad\x97\x7c\xc2\xf5\x90\x70\x38\x20\xc1\xc3\xe7\x4f\x5e\x7a\x43\x8c\x31\xc4\x72\x69\xbc\x78\x46\x67\x8e\x1d\xc6\xcb\xac\x91\xa2\x90\xd0\xbf\x9c\x5d\x38\xcd\x6a\xf7\xd3\xe9\x3b\x7e\x0b\x31\x9c\x96\x5a\xb0\xfd\x81\x06\xcf\x0e\xf3\x7f\x65\xa3\x87\xa2\x90\xd0\x12\x16\xcd\x21\xa2\x3e\x00\xb1\x4f\x13\xef\x7c\x14\xef\x61\x48\xf0\x32\x79\x4f\x8c\x51\x4c\x65\xc5\xce\xaa\xf7\x2c\x28\x3b\x23\xee\x5b\x34\x6e\xa7\x1b\x60\xc4\xef\x27\xea\xd6\xf7\xd9\x83\xa0\xa0\xee\xcf\xb2\x85\xb8\xd8\x7d\x3e\xeb\xd7\xdb\xa0\x60\xda\x03\x06\x4f\xf9\x5d\x58\x01\x7c\x5f\xbd\xfc\x0c\x00\x00\xff\xff\xe4\x6f\x10\x7d\x11\x07\x00\x00") +var _res_messages_en_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x94\x41\x6f\xdb\x30\x0c\x85\xef\xf9\x15\x84\x81\xa0\x97\x2c\xc0\xb6\x9b\x8f\x2b\xba\x61\xc0\x2e\x6b\xd7\xd3\x3a\x08\xaa\x4c\x3b\x02\x1c\x2a\x15\xe9\x25\x41\xd1\xff\x3e\x50\xb6\xb7\x62\x88\x6c\x6f\x97\x1c\xcc\x4f\xef\x89\x8f\x62\x9e\x57\x00\x45\x6b\xa9\xe9\x6c\x83\x45\x09\x05\xd2\x9b\xfb\xbb\x62\xa3\x9f\xf7\xc8\x6c\x1b\xe4\xa2\x84\xef\x2b\x00\x80\xe7\xf4\x0b\x50\xf8\x4a\xd1\x4e\xab\x09\x4d\x1f\x25\x5a\xe2\xd6\x8a\x0f\xa4\xd5\x7b\xad\x96\x45\xaa\xbe\x6c\x2e\x9d\xc7\x93\xdd\x1f\xda\xbc\xc2\x4d\x5f\x9f\xd4\xa8\x43\x34\x73\x3a\xb8\x6d\xb6\xb0\xe6\x29\x19\x09\x62\xdb\xac\xc0\xb7\x54\x1d\x8f\x5f\x3a\xff\x88\x8d\x27\xe3\x02\xd5\xbe\xc9\xca\x7c\x50\x08\x24\x40\xcf\x6d\x40\xce\x07\x84\x2b\x3c\x79\xb9\xd2\xcf\x4f\x9d\x97\xed\x64\x60\x24\x18\xcd\xef\x69\x65\x73\x53\x0c\x64\x87\x30\xa2\x70\x0e\x1d\x1c\x2d\x89\xda\x74\x8c\xe5\x03\xbd\xdd\xc2\x0d\x35\xad\xe7\x1d\xac\xf9\x81\xde\x6d\xe1\x7a\xe7\x09\x19\x67\x92\x72\x5d\x8c\x48\x32\xd7\xeb\x75\x8f\x0d\xad\x96\x93\xe1\x71\xe7\x1c\x32\x1b\x09\x26\xa2\xad\xb2\x9a\x03\xa7\x3d\x28\x07\xb5\x6f\xe7\x6e\x5b\x5b\xdf\x8e\xba\x46\xf9\xac\xf8\x47\xeb\xdb\xbf\x95\x27\x87\x31\x4a\x1f\x6c\x64\x5c\xa6\x9d\xd0\x34\x18\x17\x48\x34\x9e\x50\xff\x87\x57\xb4\xa4\x5b\x99\x73\x5b\x33\x78\x06\x0a\x02\xb7\xc8\xb7\x89\x85\x3a\xc4\xbd\x95\x0d\x48\x3c\xff\xb9\x88\x65\x25\x3e\x13\xcb\x2b\xf7\x4b\xf6\x0d\x12\x46\x2b\x68\x22\xba\x10\xab\xbc\xf5\xa7\x01\x84\x75\x05\x03\xab\x76\x43\x8b\x1b\xe0\x03\x52\xa5\x45\x46\xb7\xac\x63\x17\x88\xd0\x89\xe1\xa7\xd6\x4b\x3e\xe1\x7a\x48\x38\x1c\x90\xe0\xee\xeb\x17\x2f\xbd\x21\xc6\x18\x62\xb9\x34\x5e\x3c\xa1\x33\x4f\x1d\xc6\xf3\xac\x91\xa2\x90\xd0\x7f\x9c\x5d\x38\xce\x6a\xf7\xd3\xe9\x3b\x7e\x0f\x31\x1c\x97\x5a\xb0\xfd\x89\x06\x4f\x0e\xf3\x7f\x65\xa3\x87\xa2\x90\xd0\x12\x16\xcd\x21\xa2\x3e\x00\xb1\x8f\x13\xef\x7c\x14\xef\x61\x48\xf0\x32\x79\x4f\x8c\x51\x4c\x65\xc5\xce\xaa\xf7\x2c\x28\x3b\x23\xee\x5b\x34\x6e\xa7\x1b\x60\xc4\xef\x27\xee\xad\xef\xb3\x07\x41\x41\xdd\x9f\x65\x0b\x71\xb6\xfb\x7c\xd6\xaf\xb7\x41\xc1\xb4\x07\x0c\x9e\xf2\xbb\xb0\x02\xf8\xb1\x7a\xf9\x15\x00\x00\xff\xff\x44\x3d\xa9\x66\x95\x07\x00\x00") func res_messages_en_json() ([]byte, error) { return bindata_read( @@ -52,7 +52,7 @@ func res_messages_en_json() ([]byte, error) { ) } -var _res_messages_zh_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x94\xcf\x4e\xdb\x4c\x14\xc5\xf7\x79\x8a\x91\x25\x8b\x4d\x84\xf4\x7d\x4b\xf6\x5d\x54\xea\xa6\x74\x59\x2a\x6b\x70\x6e\x82\x25\x67\x0c\x1e\xa7\x0d\x45\x48\x16\x2a\x22\x94\xa4\xa0\x26\x21\x94\x3f\x0d\xb4\x4d\x41\x95\x12\x07\x09\xd1\x10\x1c\x78\x98\x7a\x26\x93\x55\x5e\xa1\xb2\x03\x08\xaa\xd8\x89\x60\x63\xc9\xf6\xf5\xf9\xcd\xb9\xf7\x5c\x2f\xc5\x10\x92\x74\x4c\x52\x19\x9c\x02\x69\x0a\x49\xef\xe7\xa4\xb8\xff\x2c\x0d\x94\xe2\x14\x50\x69\x0a\xbd\x8e\x21\x84\xd0\x52\x70\x45\x48\xd2\x12\x7e\x5d\xd2\x30\x15\xc8\xe2\xf4\xbc\x0e\xc1\x07\xc1\x2b\xcb\xc4\x84\xea\xd8\xd2\x0c\xe2\xd7\x78\x57\x1b\xec\xe7\x0a\x92\xa9\x14\x14\x2c\xc7\x87\x09\xcd\x42\x4a\x23\x8a\x6a\x90\xa4\x96\x0a\x55\x62\xae\xcd\x8e\x37\x7a\xab\x85\x6e\xa7\x11\x47\xe2\xaa\xc8\x56\x6b\x13\x90\xd5\xac\x89\x9e\x6d\xb3\xb5\xf6\x1f\x7b\x25\x8a\x01\xc4\x02\x53\xb9\xb3\x19\x46\x11\xce\xef\x81\xb4\xd7\x39\xe4\xfb\x55\xbe\xbf\xe7\x75\xae\xbb\xa5\x93\xee\xee\x07\xe1\xd4\xc5\x89\x3d\x35\x43\xfe\x9b\x44\x62\xe3\x94\x6f\xaf\x21\x99\xce\x90\xff\x27\x91\xd7\xaa\x0f\xee\xa2\x0e\xa0\x66\x4c\x13\x88\x35\xd2\x66\xa7\xc8\xd6\x0b\x03\x9b\x7d\x77\xf7\x4e\x71\x98\x24\xcd\xa8\x2a\x50\xaa\x58\x86\x62\x02\x4e\x44\x98\xba\x64\x9b\xdb\x7c\x7b\xcd\xbb\x3c\x97\x29\xcf\x6d\xb1\x8f\xd5\x11\xed\x4a\x62\x4d\xbf\xd5\x55\x92\x5a\xc4\x84\x1f\x8a\xb3\x1f\xa7\xe2\xac\x36\xa6\xf8\x3c\x36\x29\x8c\x50\x3f\xfe\xce\xbf\x6e\x3d\x41\xdd\xc4\xc4\x8f\x70\x98\xbe\x4c\xbd\x56\x81\xef\x38\xd3\x40\xa7\x83\x4a\x7e\xe8\x32\x77\xb3\xef\xe6\x59\xf3\x40\x38\xe5\x01\xdf\x6b\xb5\xa7\x81\x3e\x27\xd4\xa2\xcc\xb9\x10\xa7\x47\xf7\x8f\x30\xec\x0c\x29\x20\x60\x62\x0b\x14\x13\x54\xc3\x4c\x84\xf3\xbb\xa5\x2a\xcf\x6d\xc9\x09\xaf\xf5\x4b\x34\x9a\xac\x53\x66\xb9\xe6\xad\xdb\xbe\x9b\x17\x76\x85\x57\xce\xe5\x44\xf7\xf8\xf3\x98\xae\x55\x83\x10\x50\x2d\x85\x2e\xe8\x9a\x15\xde\x57\xbe\x5e\x64\xae\xfd\xea\xe5\x0b\xcd\x02\x5e\x6e\xf2\x42\x83\xb5\x8b\xb7\x0d\xee\xbb\xf9\x5e\xe9\x8b\x70\x9c\xbe\xbb\x2b\xd3\x31\xc1\x90\x05\x55\x59\xc8\x80\xb9\x18\x0a\xbd\xc1\x55\x6b\xc2\xf9\x76\x47\x12\x4e\x9d\x6d\xd6\x02\xd2\xa3\xb8\x37\x63\x36\xde\x8d\xc0\x8a\xa3\xfc\x60\x98\xff\x78\x1c\x1b\x44\xf1\x5b\x50\x20\xab\x82\x1e\xfe\xb7\xbb\x3e\x60\xf5\x9d\x67\x7e\xcd\x13\x3a\xa9\x9a\xe0\x47\xc7\xc2\xb3\x11\x8b\xc1\x72\x7b\xec\xb2\x2d\x8e\x4e\x1e\x37\x34\x4d\x07\x45\x9d\xf3\x13\xaf\x58\x5a\x3a\x22\x27\x41\x16\xbd\xeb\x06\x2f\x5d\xf0\xca\x79\xaf\x72\xe6\xb5\xda\x0f\xe5\x23\xf3\xbf\x88\xd3\xe1\xed\xba\x17\x7e\xbf\xee\x86\xd5\xfe\xd4\xdd\x6b\xb0\x4e\xd9\x5f\xcd\x7a\x1c\x0d\x5d\x81\x18\x42\x6f\x62\xcb\x7f\x03\x00\x00\xff\xff\xf5\xca\x37\x06\xba\x06\x00\x00") +var _res_messages_zh_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x94\x5f\x4f\x1a\x4b\x18\xc6\xef\xf9\x14\x13\x12\xe2\x0d\x31\x39\xe7\xd2\xfb\x73\x71\x92\x73\x73\xec\x65\x6d\x36\xe3\xf2\x82\x9b\x2c\xb3\xba\xb3\xb4\x58\x63\xb2\x31\x35\xa2\x40\x35\x05\xc4\xfa\xa7\x68\x5b\xaa\x6d\x02\x8b\x89\xb1\x2b\x2e\xf8\x61\xba\x33\x0c\x57\x7c\x85\x66\x17\x35\xda\xb0\x0b\xd1\x1b\x12\x66\xde\xfc\x9e\x79\x9e\xf7\x7d\x77\x25\x82\x50\x54\xc5\x24\x95\xc1\x29\x88\xce\xa0\xe8\xdb\x85\x68\xdc\x3b\x4b\x03\xa5\x38\x05\x34\x3a\x83\x5e\x46\x10\x42\x68\xc5\xff\x45\x28\xaa\x24\xbc\xba\x8c\x77\xeb\x97\xfa\x87\x86\x8e\x09\x55\xb1\xa1\x68\xc4\xbb\x65\x76\x93\x6d\x7d\x1f\x38\xfb\x51\xbf\x60\x35\x3e\x0a\x01\x59\x9c\x5e\x54\x83\x21\xae\xdd\x75\xbb\xf9\x31\x90\xa4\xa6\x4b\x63\x41\xdd\x3c\xfb\xb6\x86\x62\x34\x0c\x34\x0f\x29\x85\x48\xb2\x46\x92\x4a\x2a\xd8\x97\x63\xb2\xd3\x7c\x7f\xbd\xd8\xeb\x34\xe3\x48\x74\x4b\x6c\xbd\x3e\x05\x59\xc5\x98\xea\x9b\x26\xdb\x68\xff\x32\xd7\x42\x1d\x13\x03\x74\xe9\x3e\xee\x20\x15\x61\xfd\x1c\xa2\xdd\xce\x31\x3f\xac\xf1\xc3\x03\xb7\x73\xd3\x2b\x9f\xf5\xf6\xdf\x09\xab\x21\xce\xcc\x99\x39\xf2\xd7\x34\x12\xf9\x73\xbe\xbb\x81\x62\x74\x8e\xfc\x3d\x8d\x5c\xbb\x31\xfc\x17\xf6\x00\x39\xa3\xeb\x40\x8c\xb1\x36\x3b\x25\xb6\x59\x1c\xda\x7c\x98\xff\x28\x24\xcd\xc8\x32\x50\x2a\x19\x9a\xa4\x03\x4e\x84\x98\xba\x66\xdb\xbb\x7c\x77\xc3\xbd\xbe\x8c\x51\x9e\xdb\x61\x5b\xb5\x31\x71\x25\xb1\xa2\xde\x71\xa5\xa4\x12\xd2\xe1\xc7\x70\xf6\xf5\x5c\x5c\xd4\x27\x84\x2f\x62\x9d\xc2\x18\xfa\xe9\x17\xfe\x69\xe7\x19\x74\x1d\x13\x6f\x95\x82\xf8\x31\xea\xda\x45\xbe\x67\xcd\x02\x9d\xf5\x2b\xf9\xb1\xc3\x9c\xed\x81\x53\x60\xad\x23\x61\x55\x86\xfa\xae\xdd\x9e\x05\xfa\x2f\xa1\x06\x65\xd6\x95\x38\x3f\x79\xf8\x84\x51\x6f\x48\x01\x01\x1d\x1b\x20\xe9\x20\x6b\x7a\x22\x58\xbf\x57\xae\xf1\xdc\x4e\x2c\xe1\xda\x3f\x44\xb3\xc5\x3a\x15\x96\x6b\xdd\xb9\x1d\x38\x05\x61\x56\x79\xf5\x32\x96\xe8\x9d\x7e\x98\xd0\xb5\xac\x11\x02\xb2\x21\xd1\x25\x55\x31\x82\x73\xe5\x9b\x25\xe6\x98\x2f\xfe\xff\x4f\x31\x80\x57\x5a\xbc\xd8\x64\xed\xd2\x5d\xc0\x03\xa7\xd0\x2f\x7f\x14\x96\x35\x70\xf6\x63\x74\x42\x61\xc8\x82\x2c\x2d\x65\x40\x5f\x0e\x14\xbd\x95\xab\xd5\x85\xf5\xf9\x5e\x49\x58\x0d\xb6\x5d\xf7\x95\x9e\xa4\x7b\xdb\x66\xed\xcd\x18\x59\x71\x52\x18\x36\xf3\x0f\x8f\x13\x0b\x51\xfc\x1a\x24\xc8\xca\xa0\x06\x7f\xed\x6e\x8e\x58\x63\xef\x1f\xaf\xe6\x19\x49\xca\x3a\x78\xa3\x63\xe0\xf9\x90\xc5\x60\xb9\x03\x76\xdd\x16\x27\x67\x4f\x6b\x9a\xa2\x82\x24\x2f\x78\x13\x2f\x19\x4a\x3a\x64\x4e\xfc\x59\x74\x6f\x9a\xbc\x7c\xc5\xab\x97\xfd\xea\x85\x6b\xb7\x1f\xe3\x43\xe7\x7f\x19\xa7\x83\xe3\x7a\x30\xfc\x5e\xdd\xad\x56\xfb\x7d\xef\xa0\xc9\x3a\x15\x6f\x35\x1b\x71\x34\x72\x05\x22\x08\xbd\x8a\xac\xfe\x0e\x00\x00\xff\xff\x1f\x94\x8c\xc0\x42\x07\x00\x00") func res_messages_zh_json() ([]byte, error) { return bindata_read( @@ -61,7 +61,7 @@ func res_messages_zh_json() ([]byte, error) { ) } -var _res_res_go = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x99\x4b\x6f\x5c\xc7\x15\x84\xd7\x9c\x5f\x31\x21\xe0\x80\x04\x04\xf9\xbe\x1f\x06\xb4\xb1\x91\x6d\x16\xd9\xa6\x03\xe2\xde\x7e\x28\x4c\x2c\x52\x99\x21\x9d\xb6\x02\xff\xf7\xe0\x3b\xa7\x46\xa2\x65\x25\x40\x84\x2c\x28\x8a\x33\x73\xbb\xcf\xa3\x4e\x55\x75\xcf\xfb\x2d\xfe\x7d\x7b\x9b\x8f\xa7\x7c\x3e\x1c\xee\xdf\xbd\x7f\x3c\x3d\x1d\x6f\x0e\x57\xd7\xfb\xcf\x4f\xf9\x7c\x7d\xb8\xba\x8e\x8f\xef\xde\x9f\xf2\xf9\xfc\xed\xdb\x0f\xf7\xef\x79\xa1\xbc\x7b\xe2\xd7\xfd\x23\xff\x9e\x9f\x4e\xf7\x0f\x6f\xcf\xd7\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x2e\x1e\xdf\xb8\x86\x9a\x53\xa8\xb1\xf1\xe7\xc6\xe8\x75\x6a\x37\xaf\x13\x75\x6e\xa6\x50\x27\x62\x99\x3d\x67\xf2\x07\x4f\x5d\x74\x9c\x92\x23\xcf\x18\x2e\x94\x17\x7b\xb2\x1e\x7d\x9e\x1a\xf5\x61\x52\x6e\xf4\x61\x52\xaf\xc1\x0a\xbf\x47\xc7\x0d\xfd\x05\xef\x2b\x78\xce\xa1\xb6\xc2\xe3\xde\x86\xba\x6f\xfe\xd3\x15\xc7\x16\xbf\x97\x39\xd4\x6d\xf3\xd9\x88\xbd\xcf\xc4\xbe\xfa\x8c\x90\xbb\x61\x65\xf0\x7d\x9b\xe8\x6b\x93\x2f\x58\xa3\xbf\x7c\x96\x35\xfb\xec\xb1\x30\x4b\xd4\x88\x9c\xf8\x1c\x3d\x63\x56\x63\x72\x9c\xcf\xc9\x31\x61\x71\xb5\xa1\xc6\xc5\xf1\x02\xf6\xa9\x77\x56\x9e\x3c\xbf\xf6\x9e\x13\xb9\xb2\x1f\x78\x65\xed\xc8\xda\xf4\x85\xcf\x64\x9f\x73\x66\x97\x58\xe8\x27\x79\xf4\x9a\x21\xe2\x5e\x57\x9f\x7f\xc3\xd8\x1a\xea\x32\x85\xba\x93\x0b\xef\x27\xe1\x70\xf2\x99\x6c\x77\xc7\x06\x75\xd9\x7b\xc7\x51\xa6\x4e\x9d\xef\x4b\xcd\x99\xf9\x8d\x39\x49\xa1\x96\xce\xeb\x37\xad\x9e\x17\xb1\x8c\x9d\x7f\x6e\x6c\x7d\xee\xa8\x29\x5c\x42\x0f\xc1\x3d\xcf\x80\x4b\xc3\x51\xef\xf3\x49\xbe\x13\xf9\x74\xbe\x7f\x9b\x7c\x7d\xe6\x8b\xcf\x13\xe3\xc0\xef\xcd\x31\x1c\x67\x9f\x2b\x70\xc9\x0c\x77\x83\xf7\x80\xbe\x31\xa3\x93\x38\x65\x64\x26\x67\xc7\x48\xa4\x3e\x83\xc7\xc3\x7a\xc4\x06\x16\x97\xe4\xcf\xec\x93\xd7\x7b\x4f\xce\x07\x60\x84\x39\xa4\x26\xcc\xc3\x0e\x26\x92\xbf\x96\x3a\xdf\x83\xba\xf1\x1a\xfc\xc9\xfa\xf4\x11\x0e\xd8\x1a\x8f\x0f\x8e\xb0\xd7\xb2\xf7\x81\x3d\x7a\xed\x31\x2f\x5e\x4b\x7a\xd7\xa9\x97\xc4\x02\x76\x9b\xd6\x73\x65\xcf\x51\x7c\x46\xcf\xc0\x2c\x73\xb4\xcd\xde\x47\x70\x61\x39\x2d\x3e\xcf\xd4\xa0\x61\x8d\xc5\xf9\x92\xfa\xc4\xe8\xfd\x22\x5e\xf8\x9c\x98\xc9\x9f\xfa\x18\x4f\x74\xbf\xd6\x0d\x7e\xc0\x31\x3d\xc8\xc2\xc7\x3e\xbe\xfc\xdc\xf5\xc5\x04\xfc\x56\xa9\x6e\xbe\x28\xf9\x17\xc5\x7b\xe9\x19\x0e\x57\x57\x5f\x50\xba\x57\x87\xab\xab\xeb\x53\x3e\x7f\x9b\x1e\xe3\xb7\xfe\xf2\xeb\xa7\xfa\x74\xfd\xea\x70\x75\xfb\x1b\x81\x7c\x3e\x6f\x6f\xbf\x5e\x1f\xa7\xe8\x78\x1b\x92\xd7\x0e\x9d\x32\x7d\x5c\x1c\x5f\xe0\x1e\x6c\x19\xa6\xf6\x50\x33\x18\x6f\x7d\x46\xe9\x7f\x96\x5e\x5d\x38\x8e\x1e\xf2\xd9\xb4\xfb\x3a\x70\xb1\xf1\xa3\xf0\x03\x0e\x4c\x93\xe0\x1f\xe6\xa9\xf5\xde\x37\x9b\x6b\x10\x7c\x49\x2f\xe9\x19\xcf\x33\x53\xf4\x9a\x18\xc1\x54\x16\x7e\x99\x03\x7a\x41\xcf\x27\xad\x81\x86\x80\x25\x9e\x35\x3d\x47\x77\xd0\x7f\x38\x79\x11\x96\xc1\x03\x1e\x60\xfb\xa4\x11\xa6\x3d\xb3\x74\x05\x1e\x20\x76\xd5\xce\x38\x72\xf5\xfd\x88\x85\xe7\x98\x69\xb4\x8f\xf7\x89\x7f\xdd\x43\x5d\x72\xa8\xd3\xe2\x9a\x09\x4e\x59\x33\x4a\x4f\x4c\x9f\xb2\xc7\x68\xfa\x1b\x7d\x0f\x66\x00\x2c\x82\xcb\x4e\x5c\xdb\x2a\x36\xb8\x60\xa1\x96\xad\xef\x6d\xfb\xcf\xae\x17\xc3\xe4\xda\x51\x06\x5f\x87\x9a\xe5\x45\x3c\x2e\xde\x80\x2f\x99\x81\x22\x3d\x61\xa6\x4c\x57\xf9\x3d\x38\xe7\xe2\x29\xe0\xa0\x96\x5c\x8a\xeb\x37\xdc\xc4\xda\xe8\x0d\xb5\xa3\x2f\xf4\x9a\x39\x64\xad\x3c\x79\x5e\xe8\x14\x33\x34\x25\xc7\x0a\x79\xc2\x55\xf0\x36\x5c\x01\x8f\x75\xcc\x63\xf6\x5e\x18\x87\x29\xe6\x22\xbf\x83\xee\x6f\xa3\xef\x63\x5a\x19\xdd\x0f\xd1\x23\xd6\xa0\xae\x68\xa0\xd5\x4b\x7e\x01\x1d\x2a\xab\x73\xcb\x12\x55\x93\xd1\xe7\x1c\x4f\x86\x3e\xe7\xcd\x73\xe7\x35\x7c\x10\xb9\xc0\x4f\xd4\x07\xcd\xa1\x37\xf4\xd2\xe6\x3c\xca\x63\xbd\xec\x71\xe7\xde\x82\x7a\xc1\xcf\xc6\x2d\x93\xf7\xd1\xf8\x56\x5a\x02\x3f\xe5\x2c\xff\xb6\xf9\xfb\x68\x92\xe9\x80\xf2\xa5\x87\xf8\x33\xd6\x27\x16\x6a\xcc\xbe\xe0\x06\x2d\x18\x34\x43\xeb\xe6\xbc\x78\xd1\x70\x7c\x0b\x38\x66\x2f\x3c\xd5\x26\x7c\xe3\x37\xd0\x1a\xd6\x85\x8f\xe0\x54\xbc\x8f\xf9\xc8\xa8\x99\xd2\xfe\x78\x08\xe6\x9a\x5e\xc3\xff\xac\x81\x16\x50\xcb\x5e\xb1\x31\x57\xcc\x62\x56\x5e\xbb\xfc\x5f\x6a\xbd\xce\x68\xa3\xf5\x62\xf3\xb5\xcd\xc7\x26\xef\x97\xd5\xb1\x71\xcf\x45\xff\xe9\x09\x6b\x53\xeb\x71\x76\xdf\x79\xc1\x2a\x6b\xf4\xc5\xbd\x00\x6b\xc2\xf3\xfc\x0d\x2f\xc3\xe1\xd4\xa8\xbd\xe8\xd7\xe6\xb5\xe2\x79\x70\x8b\xee\xc2\x39\xc4\xc5\x2c\x77\xe2\x12\x9e\xa3\xe7\x9b\x3c\x08\x1a\xba\x16\x69\xe7\xe6\x7d\x1d\xc5\x45\x93\xb4\x6a\x83\x3f\x26\xd7\x68\xb4\x07\x6e\xea\xc4\x4b\x68\x1a\xf3\xb0\x8a\xe7\xc0\x3b\x71\xe0\x57\x78\x9e\x1a\x98\x16\x2e\xd2\x8d\xde\xf7\x60\x8e\xec\xbc\x30\xbb\xc7\x61\x46\xe1\x52\x66\xd0\x66\x5e\xf3\x36\x67\xe7\x30\xfa\x46\xde\x97\xd7\xb3\xfc\x0b\x6b\x18\x9f\x6d\xde\x0f\x72\x01\xef\x1f\x9f\x69\xfd\xf5\x5e\xb5\xc9\x83\xd7\xd1\xb8\xbe\x75\xce\x22\x8f\x56\xbc\x85\xdf\xc6\xaf\xd0\x8b\x51\x1e\x9d\x79\x03\x03\xf0\x10\x73\x88\xdf\xa1\x46\xa3\x6a\x65\xfe\x3d\x7a\x6f\xe0\x34\x7c\x0c\xf5\x65\xce\x98\xd3\x49\x9e\x0c\x6c\x31\x03\xa3\xfa\x62\xdc\x93\xdc\xdf\x53\x33\xd6\x82\x0b\xe8\x3f\x98\xa7\xce\x70\x33\x33\x6e\x5c\x30\xc8\x63\x36\xbe\x0e\x1c\x08\x86\xc0\x1f\xf5\x9c\xc5\x23\xcc\x3e\xb8\xc6\xbb\xcf\xe2\x6c\x34\xc9\xf2\x5a\xdc\x1b\xc0\x69\x56\xa3\x24\xfe\x6c\x9d\x5b\xc1\x43\xd6\xdc\xb3\x07\x5c\x35\x6b\xee\xa8\xc3\xd2\xbb\xa6\x81\x39\xf3\x43\xbb\x63\x02\x5e\x83\x6b\x98\x65\xbc\x26\xbc\x4e\xee\xf3\x25\xde\xc6\xe7\x0e\x4e\xb4\xf9\xd7\xf3\x68\x29\xbd\x4f\xaa\x07\x7e\x88\xd9\x34\xdf\x90\x75\xce\x10\x66\x59\xd3\xea\x26\x7f\xdf\x0c\x8e\x0f\x78\xdc\xce\x2a\x8d\xe3\xd2\xf8\xa1\x75\xae\x61\x8d\xf5\x25\xdf\x83\x95\xde\x71\x37\x29\x86\x28\x8f\x8f\xf7\xb1\x59\x89\x1e\x23\xb5\x5f\xe5\xb1\x8b\x38\x94\x35\xec\x1c\x2c\xed\x06\x7b\x9c\x1d\xf8\x3f\x33\x32\xc8\x4b\xf2\xfc\x2c\x4f\x47\x2c\x76\xa6\x68\xfd\x1c\x7b\xf1\x9f\xe0\x82\xbc\xe0\x06\x72\x34\xdf\xd6\x4a\x83\xe4\x63\x3b\xf9\x4b\xfa\xf4\xf1\xa7\x73\x9f\xc1\x3e\x3c\x0b\x86\xc0\x5a\xca\x9f\xfc\x5a\x2b\x2c\x99\x8f\x1d\xbd\xe7\xe6\xc7\xe4\xdd\x57\xcd\x33\x1c\x3b\xc9\x87\x1a\xf6\xa4\xab\xe8\x10\x67\x1b\xf2\x25\x36\xf0\x49\xff\xf9\x9b\x7a\x7e\x3c\xab\xaf\xf2\x0a\x93\x73\x34\x3d\xf9\xdc\x13\xa2\x59\xe0\x93\xe7\x99\x75\xd3\xc8\xfe\x3f\x7a\xc2\x8f\xe6\xec\xeb\x2c\xe1\xc7\xc7\x7f\xe5\x08\xed\xd5\x2f\x1b\xc2\x77\xf9\xcc\x9b\xe7\xbb\xfc\x70\xf7\xb7\xf3\xe3\xc3\x57\x79\x42\xea\x03\x77\x30\x47\x53\x71\xfe\x34\x4f\x1d\x75\xee\x2a\x8e\x1f\xfa\x82\xee\x2c\xe2\xfe\x55\x1e\xca\xce\xad\xd1\xeb\x6a\xde\xa8\x78\x7d\xc1\x25\xda\x86\x7f\x80\x27\x26\xd5\x9e\xde\x50\x57\xf3\x5b\x3a\xe7\xe3\x6b\xf0\x77\x76\xcf\xb1\x39\xde\xe0\x64\xb4\x9e\xb8\xd0\x27\xe2\xe8\xe5\x19\x77\x69\x35\x3c\x6d\x73\x11\x3d\x76\x62\x32\x5d\x94\x36\x80\xab\xae\xd7\x3d\x80\x30\x0b\xce\xc8\x1d\xcc\xc2\x33\x70\x1e\x31\x31\x33\xcc\x02\x35\x43\xe3\xf1\x42\xe0\x8c\x1a\xe1\x55\x2f\x67\xad\xf6\x72\x87\x12\xc5\x17\x93\xd7\x0c\x9f\xdb\xca\x9f\xd8\x9d\xc9\xae\x39\x6e\xb4\xef\xec\x9c\xb0\xe8\x5e\x06\x9e\xbe\xc4\xd0\xb5\xae\x61\x7c\x2e\x69\x7d\x38\x3d\xca\x2f\xd9\xfb\xc9\x7d\x0a\xf3\x10\x75\x2e\xc3\xdf\x90\x1b\x98\x8f\x9a\x07\x7a\xc0\x4c\x50\x03\x38\x77\x90\xb7\x47\xf7\x79\x8f\x3e\xf4\xba\xdf\x61\x1d\x6a\x09\x5f\x2f\xba\x1f\x30\xcf\x3f\x78\x7e\xc6\x51\x49\x1a\xdb\x3b\x57\xda\x99\x2d\xba\x67\x31\xaf\xb4\x3b\xa7\xd1\x73\xf8\x0f\x1e\xe9\x74\x47\x61\xb9\x27\xef\x15\xb5\x30\x0d\x88\x9f\x74\x80\xf3\xa8\xf1\xf6\x28\xae\x2c\x9e\x0f\x78\xe8\x84\xc5\x4d\x77\x6d\x9c\xed\x1b\xf9\x66\xf0\x88\x77\x62\xff\x98\xdd\x9b\xd8\x9d\x8e\xf6\xa5\x56\x51\xd8\xe0\x77\xa7\x3a\xc2\x5d\x70\x10\x3c\x31\xe9\x0e\xc4\x9e\xd1\xf9\xb0\xa8\xdf\xf0\x89\xe9\xf4\xe2\xfe\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\xb6\xee\xf9\x0d\x6f\x8d\x9f\x95\xcd\xdb\x25\xdf\x97\xfe\x30\x33\x45\x1c\x0e\x4f\x80\x25\x38\xa2\xd1\xf9\xd6\xb4\x64\x92\x5f\xd6\x3d\x15\xbc\x42\x9d\xcc\x77\xe8\xfc\x82\x0f\xc5\x43\x30\xcb\xe6\x25\x5f\xec\x6b\x77\xcf\x93\xbc\xb5\x62\x32\x3d\x6a\xdc\x03\x90\xaf\xdd\xa1\x15\xaf\x91\x79\x96\xe2\x5a\xc3\x8c\xc0\x29\xf0\x9b\xdd\xab\x16\xf5\xb6\x75\x9d\x61\x4f\x38\x15\xcc\x6d\xca\x05\x9f\x02\xde\x8c\x73\x7a\xc7\x87\x9d\x9b\x06\x79\xd5\x59\x67\xdc\xc6\x6b\x9a\x85\xc5\x2c\xee\x2e\xba\x87\xc0\x5f\x6e\xba\x07\x63\x0d\xf2\xb5\x5e\x8f\x7e\xe7\x96\x2e\x33\x99\x1d\x3f\x60\xd0\xf8\xed\xe2\x31\x37\xe1\x4b\x5e\x06\x8e\xa3\xf6\xf8\x5e\xb8\xd3\x34\xa5\xb8\x8f\x2a\xe2\x89\xdf\xdc\x61\x0d\x3e\xbf\xe0\x9f\xbd\xe0\x8a\xcb\x3d\xff\x67\x7e\xe5\x73\xef\xf0\xbf\x5b\x96\xcf\x57\xf8\xe8\x5a\x5e\xbc\xf1\x9a\x37\xfe\x8b\x71\xf9\xf0\xd7\xaf\x37\x2e\xf6\x65\x8f\x0c\x2d\xe4\x6f\x97\x50\x02\x04\x4d\xa6\x31\x76\x19\x22\xf1\x40\x04\x58\x97\x43\x32\x46\xa6\xe8\x72\x9a\x83\x94\x5d\xe4\x27\x27\x3d\x1a\xbb\x4d\x4e\x02\xa3\xc4\x67\xd2\x01\x1d\x40\x2c\x12\x14\x06\x89\x26\xb4\x02\x09\xe6\xd7\x0e\xe1\x8b\x03\x98\xe7\x38\x00\x13\x23\xb1\xd2\xe8\x4e\x62\x6f\x5f\x0e\x15\x7f\x06\x41\x1f\x44\xde\xab\xbe\x7c\xb1\xa6\xad\x4e\x96\x34\xb3\xd5\x00\x63\xf4\x19\x74\xd6\x41\x60\x38\xe8\x31\xfc\x98\x05\xc0\x76\x21\x28\xbb\xe0\xbf\x5c\xfa\x34\x7e\x70\xc0\x20\x90\x27\x84\x02\xb8\x18\x30\xc4\xc8\x88\x54\x17\xad\xd4\x8d\xfd\x20\x68\xf2\xa7\x9e\x18\xa4\x56\x17\x1a\x8d\x08\x05\xf2\xc3\x8c\x64\x5d\xa8\x91\x1f\x20\xa7\x2f\x0c\x94\x5d\xc8\x0e\xba\x54\x1d\xdc\xb4\x5d\x9e\x03\xc0\x8b\x4c\xc2\xa2\x03\x2f\x7b\xd8\x25\xa0\xea\x97\x64\x50\x66\x11\x25\x7f\x9b\xf8\x8d\x3a\x44\x77\x3a\x54\x46\x27\x95\x28\xa0\xf3\xfb\x72\x61\x10\x65\x58\xb3\x6a\x91\xf4\x85\x86\x5d\x50\xcd\xba\x10\xd0\x70\x9b\x09\x99\x3d\x3e\x72\xdf\x64\x78\xf9\x21\x1f\x0c\xd4\xa2\x9e\xd8\x17\x1b\xba\x04\x82\x30\xc0\x97\x5d\x24\x34\xc2\xe4\xe4\xeb\xd0\x9b\x49\x07\xea\xa8\x9c\x7b\x5d\x2a\x71\xf0\x5a\xc6\x17\x04\xd3\xba\x99\xcc\xfa\x72\x81\x1c\x47\x7d\x89\x04\xd9\x19\x39\xea\xcb\x2e\x7a\xba\x4a\x34\x77\x1d\x38\x8b\xbe\xec\xc2\x50\x74\xba\xc0\x6b\x24\x02\xf4\x6c\xec\xf5\xc5\x4d\xef\xbd\x44\x08\xd8\xd3\xcc\x93\x2e\x14\xc0\x21\x75\xc1\x40\x64\x19\x3b\x72\xc0\xfc\x5e\x2e\x4e\x67\x7d\xe9\x68\x97\x54\xba\x1c\x80\xec\xb2\xbe\x50\xb4\x03\xa3\xe6\x6f\x91\x71\xb2\x8b\xaf\xde\x4d\x24\x06\x14\x81\xa5\x2e\x59\x06\x09\xc2\xb2\x4b\x51\x19\x0a\x62\x5a\x35\xe3\x10\x2d\xb3\x9b\xf4\xa5\x15\x42\x6a\xc6\xac\xf3\xbe\x1b\x79\x4e\x9a\xfb\xde\x0d\x5f\xaf\xcb\xea\xe9\xdf\x01\x00\x00\xff\xff\x69\x3a\x5e\xea\x00\x20\x00\x00") +var _res_res_go = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x99\xcf\x6f\xdc\xc8\xf1\xc5\xcf\x9a\xbf\x62\xbe\x02\xf6\x0b\x09\x30\xb4\xfc\xcd\xe6\x02\xbe\xec\x22\xd7\x1c\x72\x4d\x07\x02\xc9\x6e\x3a\x4a\x2c\xc9\x99\x91\x36\xbd\x0e\xf6\x7f\x0f\x3e\x55\x8f\x92\xe2\x35\x12\xc4\xc8\x61\x6c\x0d\x39\xec\xae\xae\x7a\xf5\xea\x55\xf1\xd3\xbc\xfe\x75\xfe\x90\x8f\xa7\x7c\x3e\x1c\xee\xee\x3f\x3d\x9e\x9e\x8e\x57\x87\x8b\xcb\xe5\x97\xa7\x7c\xbe\x3c\x5c\x5c\xae\x8f\xf7\x9f\x4e\xf9\x7c\xfe\xfe\xc3\xe7\xbb\x4f\x5c\xd8\xee\x9f\xf8\xef\xee\x91\x7f\xcf\x4f\xa7\xbb\x87\x0f\xe7\xcb\xc3\xf5\xe1\xb0\x3d\x3f\xac\xc7\xe5\xee\x21\xcd\x4f\xf3\xed\x29\xcf\xe9\x8a\xbf\x8e\x7f\xfc\x13\x6b\xbd\x3b\x3e\xcc\xf7\xf9\xe8\xbf\xbf\x3e\x5e\xed\x57\xf3\xe9\xf4\x78\xba\x3e\xfe\xe3\x70\xf1\xe1\xb3\x7d\x3b\xfe\xf0\xfe\xc8\x56\x37\xbf\xcf\x7f\xff\x43\x9e\x53\x3e\x5d\x99\x2d\x7c\xff\xf1\x79\xdb\xf2\xc9\x96\xbd\xbe\x3e\x5c\xdc\x6d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x5b\xdd\x76\xce\x80\x0f\x89\x03\xe7\x07\x93\x75\x1d\x4b\xaa\xdd\x8f\xe4\x15\xcf\x54\x4b\x2c\x01\x7c\x2d\xfe\xfb\x7e\x73\xac\xf4\xab\xe3\x67\x14\x0e\xd9\x6f\x4c\x8e\x0f\xae\xb1\x56\xbb\xf8\xd9\xc8\x69\xce\x46\xbc\xe7\x3e\x96\xb5\xf3\x1c\x1a\x95\x93\xc4\x6b\xe8\x63\x69\x15\x77\xee\xad\xc4\x37\xb8\x5f\xd3\xea\xbe\x18\x67\x5f\x3b\x34\x1e\xc3\xba\xf2\xfc\xc6\xce\xb0\xf9\xef\x2b\x61\x90\xfd\x0d\x3b\x9b\x62\x51\x7b\x0e\xe2\xdf\x35\x78\x8c\x7a\xe1\xba\xcf\x8e\x1f\xee\x11\x6f\xcb\x17\x72\xb5\x72\x5f\xb1\x47\x2f\xfc\xcc\x8d\xe7\xf9\xb4\xb8\xdd\xe4\xc4\xd6\xc6\xd2\x11\x9f\xac\x7c\x6b\xdd\xe7\xf6\x6c\xef\xb6\x81\xa7\x6a\xf3\x18\x81\x73\xf2\x85\xef\xd8\x80\xcf\xc1\xe9\x88\x4f\x07\xe7\x24\xf2\x0f\xdf\x81\x05\xc3\x31\x31\x18\x1c\xc7\x9c\xbb\x25\x3e\xf8\x27\xc7\x52\x89\xd3\x0c\x43\xc1\xed\x5d\x66\xff\xed\xc8\xfd\xde\xf9\x61\x25\x2e\x83\xf0\xd7\x38\x56\xda\x5e\x98\x61\xaf\xcd\x6d\x4d\x9d\xdb\x00\x56\xd8\x07\xbf\x73\xcf\xf2\x07\xec\xd4\x8e\x0f\xd6\xee\x93\xfb\x83\x0f\xf7\xf0\x6b\x2b\xee\x85\x1b\x39\x13\x7c\x68\x39\x5d\xb9\x7d\x21\xf9\x75\xae\x35\x3c\xb7\xb8\x8d\xe4\x07\x38\x6f\xc0\xca\xa8\x7d\x17\xc7\x28\x9c\x6f\x98\x80\xc3\xe1\x3a\xe1\x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96\x33\x39\x96\x21\x38\x6f\x84\xda\xd7\x5c\x2b\xd7\x20\x70\x28\x5a\x03\x1b\xc1\x33\x3e\x61\x0f\xd3\x0c\x8d\xd7\xd8\xa6\xf3\xda\x54\xcb\x36\xea\x11\xda\x02\xdc\xb3\xb7\xed\x3f\xba\xf6\x80\xfb\xd0\x4c\xd4\x00\xd6\x31\x0d\x14\x94\xb7\xd4\x95\xe4\xd8\xa6\x8e\xe1\x1f\xd3\x66\xc9\xf3\x99\x58\x52\x0f\xe0\x64\x72\x6f\xa0\xc6\x8d\xce\x8d\xa6\x69\x2a\x5f\x9b\x5a\x67\x78\x9f\x3d\xd6\xf0\xcb\x4b\xdd\x16\xaf\x90\x7b\x96\xdf\xc1\xcf\x09\x37\xc1\x77\xf0\x3f\xf5\x05\x3d\x07\xd7\x13\x0b\xea\xd4\x26\x9b\x8d\xd7\x3a\xcf\x51\x78\x90\x7d\xe0\x22\x6a\x1c\x9a\x85\x18\xb1\x06\x7e\x25\xdf\xcc\x5f\xc1\x6d\x83\x2b\xa9\x17\xd4\x29\xf8\xc1\x7c\xd2\xab\x4e\xaf\x5e\x4f\xf2\xec\x67\xe7\xda\xb4\xfa\x59\x76\x0d\x04\x17\x11\x1b\x62\x69\x79\xbe\x7a\x8c\xab\xb7\x31\x16\xef\xe2\x2f\x74\x03\x78\xa3\x16\x8c\xe2\x48\xfc\x09\x1f\x57\xb5\xf3\x43\xdd\x28\x66\xa3\xeb\x2d\xd6\x18\x75\x5e\xd3\x87\x83\xaf\x3f\x49\x37\xb2\x2f\xb8\xa1\x16\x74\xca\x21\xd3\x41\xc3\xab\xa6\x41\x07\x80\xe3\x51\xf5\x70\x16\xbe\xb7\xda\x75\x1f\xeb\x52\xeb\x92\xea\x1f\x7e\x03\x7b\x96\x53\xda\x9f\x7a\x44\x5e\x13\xeb\x24\x2d\x0b\x4f\xe3\xcb\x56\xb6\x91\x57\xe4\x62\xd6\xb9\x96\x4a\xba\xb3\x76\x3f\xa3\x61\x6b\xe9\x34\xd6\x86\x1f\x4c\x0b\xcc\xf2\x63\xe5\x7a\x91\xf8\x13\x13\xab\x91\xc9\xb5\x33\x7a\x7f\xc7\x2a\x6b\x50\x33\xd0\x1a\xac\x49\x1d\xe0\x3b\xdc\x8e\xf6\xc6\x47\xf0\x46\x2b\x7d\x8c\xaf\x78\x1e\xdc\xa2\x3f\xe0\x1c\xec\x22\x97\x1b\x71\x09\xcf\x11\x73\x30\x4f\x6d\xb0\xba\xb2\xb9\xdf\x59\x83\xb8\xf6\xe2\x22\x6a\x0b\x35\x9b\x5a\x83\x06\xa0\xbe\x8d\xaa\xfb\x8d\x78\x09\xad\x3a\xa8\x06\x12\x13\xf0\x8e\x1d\xe8\x2c\x9e\xc7\x07\xfc\x06\xbc\x53\x13\xd1\x2f\xec\x11\xd4\x57\x90\x47\xf4\x48\xe4\x28\x5c\x4a\x0e\x5a\xce\x2b\xdf\xa8\xdf\x70\x18\x71\xe3\xdc\xfb\x75\x30\x84\x3d\xa6\x79\x82\xdb\x90\xa5\x01\xc0\xfb\xcb\x33\xb5\x5f\x6f\xe5\x1b\xf4\x90\xf5\x14\x9b\x73\x4e\xa7\x73\xd4\xe2\x2d\x6a\x2c\x9a\x86\x58\xb0\x36\x79\x4c\xbe\x81\x01\x78\xc8\x34\xff\xe6\x3e\xea\xe5\x2b\xb0\x86\xfe\x6b\xa5\xe3\xa9\x7b\xf8\x97\x3c\x1b\xa5\x1b\x4d\x53\xf5\x9e\x03\xbd\xe2\x62\xdc\x93\x5c\xd7\xe2\x33\xd6\x82\x0b\x88\x3f\x98\xc7\xcf\x70\x33\x39\x6e\x5c\xd0\x79\xcc\xd0\x56\xac\x63\x7d\x46\xed\xf8\xc3\x9f\xa3\x78\x84\xdc\x07\xd7\x49\x7a\x14\xce\xa6\x26\xd9\xb9\x82\x6b\x7e\x38\xcd\x7c\x94\xc4\x9f\xb5\x7a\x8d\xd5\x35\x30\xb6\xb1\x07\x5c\x35\x2a\xef\xf0\x43\x68\xbd\xa6\x81\x39\xd3\x22\x8b\x63\x02\x5e\xb3\xda\xdf\x7a\x5f\x09\xaf\x73\xf6\x71\xb7\xb7\xf2\xbc\x83\x13\xb3\x7a\x3a\x9e\xa7\x96\x12\xfb\x24\x7f\xa0\xab\xc8\x4d\x62\x47\x0e\xa0\xe5\x3b\x61\x96\x35\x57\xf5\x9d\x68\xb2\xaa\x73\x7c\xc0\xe3\xe4\x10\xe7\x01\x97\x9d\xfa\x58\xb8\xc6\xfa\xe4\xb7\x7c\x1f\xbc\x17\xab\x75\x3e\x6c\x00\x23\x68\x51\x7a\x68\xcb\x95\xd5\x6d\xc4\xf7\x96\xeb\x93\x38\x78\xf2\x35\x6a\x69\x6a\x6a\x37\xd8\xa3\x97\xe1\x6f\x72\xc4\x78\xb8\xf3\xe7\x39\x7b\x52\x3d\x4b\xea\x5d\xe8\xc1\x8d\x0f\x2b\xf5\x13\xab\x7a\xbd\x41\xb3\x80\x5a\x35\x28\x79\x6d\x68\xa4\x41\x89\xd3\xcb\xa7\x91\x4e\xee\xfc\x59\x30\x04\xd6\x92\x30\xb1\xeb\x6c\xb0\x04\x6e\xad\x1f\xee\x5c\x37\xb3\xbe\x71\x89\xf2\xd9\x74\x79\x72\xbf\x1b\xf6\x54\x57\xa9\x43\x68\x42\xce\x8b\x6d\xe0\x93\xf8\xf3\x1d\x7f\xc2\xf1\x3b\x07\x4c\x3a\x3b\x1c\x4d\x4c\xbe\xd4\x84\xd4\x2c\xd3\xac\xbd\xe7\xfa\x7f\xd0\x84\x2f\xe2\xec\xdb\x24\xe1\xcb\xe3\xff\xa2\x08\xed\xea\xd7\x05\xe1\x7d\x3e\x73\xf3\x7c\x9b\x1f\x6e\xff\x72\x7e\x7c\xf8\x26\x4d\x38\x49\x9f\x93\x47\xc3\xe6\xfc\x49\x0f\x5c\xad\x5e\x33\x4c\x13\x4e\x5e\x4b\xa9\x3b\x41\xdc\x3f\x49\x9f\xa0\x0f\x16\xf5\x6c\xc4\xa9\x51\x7f\x44\x5d\xe3\x1e\x1c\x41\xdf\x42\x4d\xda\xb5\x7a\xb5\xcf\x33\xa4\x8d\xd0\x76\xe4\x7d\x33\xab\x66\x4f\x5e\xe7\x3b\xf5\xcc\x16\x0b\xe9\xc5\x45\x75\x1a\x8e\x0e\x9a\xd7\x60\x37\xf6\xb0\x06\x5c\x0b\x16\xb0\x9b\xd8\x05\xf5\x1a\x70\x67\x2f\xed\x6f\x7c\xb6\x78\x7d\x60\x2f\xd6\x08\xe2\x39\x70\x55\x49\xef\x72\x26\x7a\xf3\x45\x35\x05\xcd\x66\x35\x67\x54\x9f\xbb\x3a\x6f\xc1\xcd\xd4\x4b\x9b\xc1\xc8\x07\xec\x63\x3d\xee\xe8\x39\x58\x29\x97\xc9\x3b\xf4\x43\x92\x3e\xb5\x1c\x9c\xbc\x76\xd7\x7b\xff\x3f\x4b\x47\x29\xb7\x2a\xcd\xe5\xac\xff\x57\xbf\x3f\xa9\x5f\x9d\xa5\xa5\x8d\x8f\xb2\xe7\x15\x39\x06\x6f\x27\xad\x49\x1d\x5f\xd4\x5f\x99\xf6\xdf\x5e\xeb\x0d\x3a\x81\x3a\x67\xf9\xad\xf8\x2c\xc1\x73\xcb\x7c\x5d\xb9\x0e\xb4\x5a\x33\x29\xef\x1a\xc7\xc9\xbc\xc7\x5f\xba\x09\x2d\x8a\xbf\x7b\xe5\x0e\x71\x0b\xea\x49\x1b\xe9\xa5\x4a\xfa\x70\x51\x9f\x46\xdf\x48\xbf\x8a\x6f\xc0\x05\x39\xdc\x49\x97\x60\x83\xfd\x9d\xbd\x57\xc4\xbf\xf8\x16\xee\x31\xfd\x32\x79\x9c\xf8\xad\xcd\xdc\x92\xe3\x80\x3a\x60\x73\x96\xca\xd7\xb3\xfe\x26\x79\x6c\xac\xc7\xe8\xfd\xac\xd4\x6d\x70\xce\x6f\xe1\x70\x70\x4f\x1c\x47\xe9\x62\xce\x63\xb8\x4c\x8e\x25\xfc\x08\x07\x04\xf5\xdd\x95\x66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\xee\x73\xb5\xbd\xaf\x54\x9f\x36\xd5\x8e\x2d\xd6\xc7\xa6\x51\xf5\x04\xfc\xb2\x37\x79\x8b\xbe\xdd\xc4\xfd\x70\x2d\x7c\x6f\x73\xb3\xcd\x31\x62\xf6\x8d\xd2\xd8\x95\xeb\x07\xce\x56\xa9\xa6\x57\xea\x79\x58\x7b\xd0\xac\xda\xf4\xe7\x9b\x7d\x89\x07\x1a\x60\xd5\x79\xb8\x87\x2f\xe0\x60\x74\x03\x39\x43\x3c\xb3\xe6\x80\xb5\x78\x9a\x1a\x85\x9f\xb6\xca\x73\x06\x4e\x61\x4f\x72\x0f\xad\x4b\x7d\x62\x4f\xf4\x27\x67\x99\x75\x16\xea\x1e\x79\xd3\x6a\x76\x95\x95\x2f\xad\x66\xbb\xc4\xc4\xfa\xe2\xca\x71\x67\x35\x61\x94\xf6\x17\x0f\xd1\x4f\x90\x77\xd4\x38\xab\x73\xc9\x39\x99\xfd\xac\x1f\xac\x35\xd7\x5b\xdc\x66\x62\x3c\xef\xb3\xed\x5a\xda\xaf\xf3\x35\x2a\xcd\xeb\xd0\xf8\x36\x9f\xac\x5e\xe7\x25\x8b\xf0\xb0\xd7\xf0\x2f\x35\x8e\xf5\xe6\xc9\x6b\xe1\xa0\x9e\xb4\x1a\xbf\xaa\x71\xbe\xd4\x1b\xff\xbd\xcc\xf9\x72\x85\x17\xa5\xf3\xe6\xc6\x0d\x37\xfe\x8d\xd8\xf9\xfc\xe7\x6f\x17\x3b\xf6\x72\xab\x93\x38\xdf\xbc\x71\x24\x71\xac\x40\x0c\x6f\xc4\x4e\xe7\x80\x01\x58\x79\x27\xf6\xda\x87\xaf\x36\x78\x6a\x14\x98\xd6\x03\x65\xc4\xdd\xfa\x27\x0b\x34\x10\xbd\x35\x17\xad\x07\x26\x48\x50\x98\x30\x6e\x9d\x30\x16\xbd\x78\xe9\x25\xee\x21\xe8\x76\x6f\x5a\x1a\xbd\x04\x11\x71\x00\x24\x9a\xab\x59\x4d\x0a\x80\x9b\x35\x74\x25\xd8\x9c\x3f\xe8\x25\x8a\x09\xdc\xfc\x3a\x30\x63\xaf\x56\xc5\x0e\x42\x1d\xd7\xd7\x61\x05\x64\xc0\x1e\x49\x09\x08\xf8\x6c\x68\xbe\xf8\xf9\x07\x0d\xdf\xb7\xfd\xa5\xc4\x24\xb0\x8d\xde\x2c\x8f\x1a\xca\x70\xbe\x7d\xa0\x47\xc2\x50\x78\x27\x35\xb2\x8d\x08\xd6\x92\x48\x0d\x0d\x45\xc3\x6c\x08\x6a\x42\xf7\x41\x5c\xeb\x04\x08\x81\x70\xee\x56\xc3\x23\x04\x1a\xa4\x04\x29\x42\xb4\x36\xc0\x09\xbe\x97\x01\x59\x43\x28\x7c\xc2\xde\x90\x30\xe7\x26\x99\x47\x15\x2a\x88\x06\x1f\x42\x20\x34\x63\x41\x03\x7e\x7b\x41\x51\x3b\xd9\x0d\x6a\xe2\x17\x0d\xb6\x46\x15\x59\x6b\x28\x25\xa8\xb0\x8d\xf8\x43\x12\x14\xbe\x41\x71\x32\xd2\x99\x9d\xf4\x7b\x0d\x81\xec\x05\x48\xe7\xf6\x1b\x39\x65\x4f\x76\x0a\x02\x7b\x6c\x7a\x41\x09\x99\xcd\x7a\xd1\x89\x1f\x86\xf6\x95\x18\x5a\xbd\x24\x82\x10\x82\x5e\x5c\xe1\x17\xe2\x69\xff\x6f\xf2\x71\xef\x84\xb6\xa8\x40\x4d\x1a\x56\x21\xac\x53\xf0\xf3\xef\x38\x83\x90\xc1\xc1\xb8\x0f\xd2\x83\xfb\xa8\xd5\x8b\x44\xd6\x19\xff\x19\x00\x00\xff\xff\xff\x86\xa4\x90\x00\x20\x00\x00") func res_res_go() ([]byte, error) { return bindata_read( diff --git a/src/action/config.go b/src/action/config.go deleted file mode 100644 index fe5952e..0000000 --- a/src/action/config.go +++ /dev/null @@ -1,7 +0,0 @@ -package action - -import configUtils "github.com/easysoft/zendata/src/utils/config" - -func Set() { - configUtils.InputForSet() -} diff --git a/src/action/generator.go b/src/action/generator.go index d673c5e..f85ef58 100644 --- a/src/action/generator.go +++ b/src/action/generator.go @@ -7,27 +7,29 @@ import ( "github.com/easysoft/zendata/src/gen" "github.com/easysoft/zendata/src/model" constant "github.com/easysoft/zendata/src/utils/const" - i118Utils "github.com/easysoft/zendata/src/utils/i118" logUtils "github.com/easysoft/zendata/src/utils/log" "github.com/easysoft/zendata/src/utils/vari" "os" "path/filepath" "strings" - "time" ) func Generate(deflt string, yml string, total int, fieldsToExportStr string, out string, format string, table string) { - startTime := time.Now().Unix() + //startTime := time.Now().Unix() if deflt != "" && yml == "" { yml = deflt deflt = "" } + fieldsToExport := make([]string, 0) + if fieldsToExportStr != "" { + fieldsToExport = strings.Split(fieldsToExportStr, ",") + } + vari.InputDir = filepath.Dir(yml) + string(os.PathSeparator) constant.Total = total - fieldsToExport := strings.Split(fieldsToExportStr, ",") rows, colTypes := gen.GenerateForDefinition(deflt, yml, fieldsToExport, total) content := Print(rows, format, table, colTypes, fieldsToExport) @@ -35,8 +37,8 @@ func Generate(deflt string, yml string, total int, fieldsToExportStr string, out WriteToFile(out, content) } - entTime := time.Now().Unix() - logUtils.Screen(i118Utils.I118Prt.Sprintf("generate_records", len(rows), out, entTime - startTime )) + //entTime := time.Now().Unix() + //logUtils.Screen(i118Utils.I118Prt.Sprintf("generate_records", len(rows), out, entTime - startTime )) } func Print(rows [][]string, format string, table string, colTypes []bool, fields []string) string { @@ -55,8 +57,8 @@ func Print(rows [][]string, format string, table string, colTypes []bool, fields for j, col := range cols { if j >0 { - line = line + ", " - valueList = valueList + ", " + line = line + "" + valueList = valueList + "" } line = line + col diff --git a/src/gen/definition.go b/src/gen/definition.go index f438279..e7bd2e9 100644 --- a/src/gen/definition.go +++ b/src/gen/definition.go @@ -37,27 +37,28 @@ func LoadRootDef(defaultFile, ymlFile string, fieldsToExport *[]string) model.De return ymlDef } - MergerDefine(&defaultDef, &ymlDef) - if len(*fieldsToExport) == 0 { for _, field := range ymlDef.Fields { *fieldsToExport = append(*fieldsToExport, field.Field) } } + MergerDefine(&defaultDef, &ymlDef) + return defaultDef } func MergerDefine(defaultDef, ymlDef *model.DefData) { defaultFieldMap := map[string]*model.DefField{} ymlFieldMap := map[string]*model.DefField{} + sortedKeys := make([]string, 0) for i := range defaultDef.Fields { - CreatePathToFieldMap(&defaultDef.Fields[i], defaultFieldMap) + CreatePathToFieldMap(&defaultDef.Fields[i], defaultFieldMap, nil) } for i := range ymlDef.Fields { - CreatePathToFieldMap(&ymlDef.Fields[i], ymlFieldMap) + CreatePathToFieldMap(&ymlDef.Fields[i], ymlFieldMap, &sortedKeys) } for path, field := range ymlFieldMap { @@ -68,7 +69,8 @@ func MergerDefine(defaultDef, ymlDef *model.DefData) { } } - for _, field := range ymlFieldMap { + for _, key := range sortedKeys { + field := ymlFieldMap[key] if strings.Index(field.Path, "~~") > -1 { continue } // only for top fields _, exist := defaultFieldMap[field.Path] @@ -78,7 +80,7 @@ func MergerDefine(defaultDef, ymlDef *model.DefData) { } } -func CreatePathToFieldMap(field *model.DefField, mp map[string]*model.DefField) { +func CreatePathToFieldMap(field *model.DefField, mp map[string]*model.DefField, keys *[]string) { if field.Path == "" { // root field.Path = field.Field } @@ -87,12 +89,16 @@ func CreatePathToFieldMap(field *model.DefField, mp map[string]*model.DefField) for i := range field.Fields { field.Fields[i].Path = field.Path + "~~" + field.Fields[i].Field - CreatePathToFieldMap(&field.Fields[i], mp) + CreatePathToFieldMap(&field.Fields[i], mp, keys) } } else { path := field.Path //logUtils.Screen(path + " -> " + field.Field) mp[path] = field + + if keys != nil { + *keys = append(*keys, path) + } } } diff --git a/src/gen/generator.go b/src/gen/generator.go index 9cf9134..032e783 100644 --- a/src/gen/generator.go +++ b/src/gen/generator.go @@ -23,7 +23,7 @@ func GenerateForDefinition(deflt, yml string, fieldsToExport []string, total int continue } - values := GenerateForField(&field, total) + values := GenerateForField(&field, total, true) constant.Def.Fields[index].Precision = field.Precision fieldNameToValues[field.Field] = values @@ -48,13 +48,13 @@ func GenerateForDefinition(deflt, yml string, fieldsToExport []string, total int return rows, colTypes } -func GenerateForField(field *model.DefField, total int) []string { +func GenerateForField(field *model.DefField, total int, withFix bool) []string { values := make([]string, 0) if len(field.Fields) > 0 { // sub fields arr := make([][]string, 0) // 2 dimension arr for child, [ [a,b,c], [1,2,3] ] for _, child := range field.Fields { - childValues := GenerateForField(&child, total) + childValues := GenerateForField(&child, total, withFix) arr = append(arr, childValues) } @@ -67,7 +67,7 @@ func GenerateForField(field *model.DefField, total int) []string { concat = field.Prefix + concat + field.Postfix values = append(values, concat) } - values = LoopSubFields(field, values, total) + values = LoopSubFields(field, values, total, withFix) } else if field.From != "" { // refer to res groupValues := constant.Res[field.From] @@ -82,7 +82,7 @@ func GenerateForField(field *model.DefField, total int) []string { values = append(values, groupValues[slct]...) } - values = LoopSubFields(field, values, total) + values = LoopSubFields(field, values, total, true) } else { // basic field values = GenerateFieldItemsFromDefinition(field) @@ -96,10 +96,6 @@ func GenerateFieldItemsFromDefinition(field *model.DefField) []string { values := make([]string, 0) - // 整理出值的列表 - //datatype := strings.TrimSpace(field.Type) - //if datatype == "" { datatype = "list" } - fieldValue := GenerateList(field) index := 0 @@ -169,7 +165,7 @@ func GetFieldValStr(field model.DefField, val interface{}) string { return str } -func LoopSubFields(field *model.DefField, oldValues []string, total int) []string { +func LoopSubFields(field *model.DefField, oldValues []string, total int, withFix bool) []string { if field.Loop == 0 {field.Loop = 1} values := make([]string, 0) @@ -183,7 +179,7 @@ func LoopSubFields(field *model.DefField, oldValues []string, total int) []strin count := 0 for { // 处理格式、前后缀、loop等 - str := GenerateFieldValWithFix(*field, fieldValue, &index, true) + str := GenerateFieldValWithFix(*field, fieldValue, &index, withFix) values = append(values, str) count++ @@ -195,7 +191,7 @@ func LoopSubFields(field *model.DefField, oldValues []string, total int) []strin return values } -func GenerateFieldValWithFix(field model.DefField, fieldValue model.FieldValue, indexOfRow *int, withLoop bool) string { +func GenerateFieldValWithFix(field model.DefField, fieldValue model.FieldValue, indexOfRow *int, withFix bool) string { prefix := field.Prefix postfix := field.Postfix @@ -211,7 +207,7 @@ func GenerateFieldValWithFix(field model.DefField, fieldValue model.FieldValue, *indexOfRow++ } - if withLoop { + if withFix { loopStr = prefix + loopStr + postfix } diff --git a/src/gen/res.go b/src/gen/res.go index a5ec5f3..20c165b 100644 --- a/src/gen/res.go +++ b/src/gen/res.go @@ -142,7 +142,7 @@ func getResForRanges(ranges model.ResRanges) map[string][]string { tempField.Field = ranges.Field tempField.Range = exp - groupedValue[group] = GenerateForField(&tempField, constant.Total) + groupedValue[group] = GenerateForField(&tempField, constant.Total, false) } return groupedValue @@ -165,7 +165,7 @@ func getResForInstances(insts model.ResInsts) map[string][]string { tempField.Fields = append(tempField.Fields, child) - groupedValue[group] = GenerateForField(&tempField, constant.Total) + groupedValue[group] = GenerateForField(&tempField, constant.Total, false) } return groupedValue diff --git a/src/utils/config/config.go b/src/utils/config/config.go index ebfaee2..511e561 100644 --- a/src/utils/config/config.go +++ b/src/utils/config/config.go @@ -1,31 +1,16 @@ package configUtils import ( - "fmt" - "github.com/easysoft/zendata/src/model" - commonUtils "github.com/easysoft/zendata/src/utils/common" - "github.com/easysoft/zendata/src/utils/const" "github.com/easysoft/zendata/src/utils/display" fileUtils "github.com/easysoft/zendata/src/utils/file" "github.com/easysoft/zendata/src/utils/i118" - logUtils "github.com/easysoft/zendata/src/utils/log" - stdinUtils "github.com/easysoft/zendata/src/utils/stdin" "github.com/easysoft/zendata/src/utils/vari" - "github.com/fatih/color" - "gopkg.in/ini.v1" - "os" - "reflect" ) func InitConfig() { vari.ExeDir = fileUtils.GetExeDir() vari.WorkDir = fileUtils.GetWorkDir() - CheckConfigPermission() - - constant.ConfigFile = vari.WorkDir + constant.ConfigFile - vari.Config = getInst() - InitScreenSize() i118Utils.InitI118(vari.Config.Language) @@ -35,116 +20,4 @@ func InitScreenSize() { w, h := display.GetScreenSize() vari.ScreenWidth = w vari.ScreenHeight = h -} - -func SaveConfig(conf model.Config) error { - fileUtils.MkDirIfNeeded(fileUtils.GetExeDir() + "def") - - conf.Version = constant.ConfigVer - - cfg := ini.Empty() - cfg.ReflectFrom(&conf) - - cfg.SaveTo(constant.ConfigFile) - - vari.Config = ReadCurrConfig() - return nil -} - -func PrintCurrConfig() { - logUtils.PrintToWithColor("\n"+i118Utils.I118Prt.Sprintf("current_config"), color.FgCyan) - - val := reflect.ValueOf(vari.Config) - typeOfS := val.Type() - for i := 0; i < reflect.ValueOf(vari.Config).NumField(); i++ { - if !commonUtils.IsWin() && i > 4 { - break - } - - val := val.Field(i) - name := typeOfS.Field(i).Name - - fmt.Printf(" %s: %v \n", name, val.Interface()) - } -} - -func ReadCurrConfig() model.Config { - config := model.Config{} - - configPath := constant.ConfigFile - - if !fileUtils.FileExist(configPath) { - config.Language = "en" - i118Utils.InitI118("en") - - return config - } - - ini.MapTo(&config, constant.ConfigFile) - - return config -} - -func getInst() model.Config { - isSetAction := len(os.Args) > 1 && (os.Args[1] == "set" || os.Args[1] == "-set") - if !isSetAction { - CheckConfigReady() - } - - ini.MapTo(&vari.Config, constant.ConfigFile) - - if vari.Config.Version != constant.ConfigVer { // old config file, re-init - if vari.Config.Language != "en" && vari.Config.Language != "zh" { - vari.Config.Language = "en" - } - - SaveConfig(vari.Config) - } - - return vari.Config -} - -func CheckConfigPermission() { - //err := syscall.Access(vari.WorkDir, syscall.O_RDWR) - - err := fileUtils.MkDirIfNeeded(vari.WorkDir + "def") - if err != nil { - logUtils.PrintToWithColor( - fmt.Sprintf("Permission denied to open %s for write. Please change work dir.", vari.WorkDir), color.FgRed) - os.Exit(0) - } -} - -func CheckConfigReady() { - if !fileUtils.FileExist(constant.ConfigFile) { - InputForSet() - } -} - -func InputForSet() { - conf := ReadCurrConfig() - logUtils.PrintToWithColor(i118Utils.I118Prt.Sprintf("begin_config"), color.FgCyan) - - enCheck := "" - var numb string - if conf.Language == "en" { - enCheck = "*" - numb = "1" - } - zhCheck := "" - if conf.Language == "zh" { - zhCheck = "*" - numb = "2" - } - - numbSelected := stdinUtils.GetInput("(1|2)", numb, "enter_language", enCheck, zhCheck) - - if numbSelected == "1" { - conf.Language = "en" - } else { - conf.Language = "zh" - } - - SaveConfig(conf) - PrintCurrConfig() } \ No newline at end of file diff --git a/src/utils/log/print.go b/src/utils/log/print.go index 5b11166..4b88a81 100644 --- a/src/utils/log/print.go +++ b/src/utils/log/print.go @@ -26,7 +26,7 @@ func PrintUsage() { exeFile += ".exe" } usage = fmt.Sprintf(usage, exeFile) - fmt.Printf(" %s\n", usage) + fmt.Printf("%s\n", usage) PrintToWithColor("\n" + i118Utils.I118Prt.Sprintf("example"), color.FgCyan) sample := fileUtils.ReadResData(sampleFile) @@ -43,7 +43,7 @@ func PrintUsage() { regx, _ = regexp.Compile(`\.bat\s{4}`) sample = regx.ReplaceAllString(sample, ".shell") } - fmt.Printf(" %s\n", sample) + fmt.Printf("%s\n", sample) } func PrintTo(str string) { diff --git a/src/utils/vari/vari.go b/src/utils/vari/vari.go index e07e4a1..2ac575c 100644 --- a/src/utils/vari/vari.go +++ b/src/utils/vari/vari.go @@ -6,7 +6,7 @@ import ( ) var ( - Config = model.Config{} + Config = model.Config{Version: 1, Language: "en"} RunMode constant.RunMode diff --git a/src/zd.go b/src/zd.go index de3c05e..dd791f3 100644 --- a/src/zd.go +++ b/src/zd.go @@ -76,8 +76,6 @@ func main() { } switch os.Args[1] { - case "-s", "-set": - set() case "-h", "-help": usage() default: @@ -91,10 +89,6 @@ func main() { } } -func set() { - action.Set() -} - func gen(args []string) { flagSet.SetOutput(ioutil.Discard) if err := flagSet.Parse(args[2:]); err == nil { -- GitLab