提交 1dcacc48 编写于 作者: 陈琦

update demo

上级 a2996516
title: range
desc: 描述
version: 1.0
fields:
- field: first # 字段名
range: 1-5, 30 # 1,2,3,4,5,30,1,2,3,4,5
title: 增加后缀
fields:
- field: fix # 字段名
range: 1-5, 30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: " | " # 后缀,特殊字符加引号,否则无法解析。
fields:
- field: field_common # 字段名
range: 1-5, 30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: "\t" # 后缀,特殊字符加引号,否则无法解析。
- field: field_step # 区间指定步长。
range: 0-10:2, 1-2:0.1 # 步长可以是整数,也可以是小数。
postfix: "\t"
version: 1.0
fields:
- field: field_common # 字段名
range: 1-5, 30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: "\t" # 后缀,特殊字符加引号,否则无法解析。
- field: field_step # 区间指定步长。
range: 0-10:2, 1-2:0.1 # 步长可以是整数,也可以是小数。
postfix: "\t"
- field: field_random # 区间指定随机。随机属性R同步长不能同时出现。
range: 1-10:R # 1,5,8...
postfix: "\t"
fields:
- field: field_common # 字段名
range: 1-5, 30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: "\t" # 后缀,特殊字符加引号,否则无法解析。
- field: field_step # 区间指定步长。
range: 0-10:2, 1-2:0.1 # 步长可以是整数,也可以是小数。
postfix: "\t"
- field: field_random # 区间指定随机。随机属性R同步长不能同时出现。
range: 1-10:R # 1,5,8...
postfix: "\t"
- field: field_loop # 自循环的字段。
range: a-z # a|b|c ...
loop: 3 # 循环三次
loopfix: _ # 每次循环的连接符。
postfix: "\t"
fields:
- field: field_common # 字段名
range: 1-5,30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: "\t" # 后缀,特殊字符加引号,否则无法解析。
- field: field_step # 区间指定步长。
range: 0-10:2, 1-2:0.1 # 步长可以是整数,也可以是小数。
postfix: "\t"
- field: field_random # 区间指定随机。随机属性R同步长不能同时出现。
range: 1-10:R # 1,5,8...
postfix: "\t"
- field: field_loop # 自循环的字段。
range: a-z # a|b|c ...
loop: 3 # 循环三次
loopfix: _ # 每次循环的连接符。
postfix: "\t"
- field: field_text # 从一个文件中随机读取。
range: user.txt:R # 相对当前文件路径。
postfix: "\t"
fields:
- field: field_common # 字段名
range: 1-5,30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: "\t" # 后缀,特殊字符加引号,否则无法解析。
- field: field_step # 区间指定步长。
range: 0-10:2, 1-2:0.1 # 步长可以是整数,也可以是小数。
postfix: "\t"
- field: field_random # 区间指定随机。随机属性R同步长不能同时出现。
range: 1-10:R # 1,5,8...
postfix: "\t"
- field: field_loop # 自循环的字段。
range: a-z # a|b|c ...
loop: 3 # 循环三次
loopfix: _ # 每次循环的连接符。
postfix: "\t"
- field: field_text # 从一个文件中随机读取。
range: user.txt:R # 相对当前文件路径。
postfix: "\t"
- field: nesting # 字段多层嵌套
fields:
- field: child1
range: a-z
prefix: part1_
postfix: '|'
- field: child2
range: A-Z
prefix: part2_
postfix: '|'
fields:
- field: field_common # 字段名
range: 1-5,30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: "\t" # 后缀,特殊字符加引号,否则无法解析。
- field: field_step # 区间指定步长。
range: 0-10:2, 1-2:0.1 # 步长可以是整数,也可以是小数。
postfix: "\t"
- field: field_random # 区间指定随机。随机属性R同步长不能同时出现。
range: 1-10:R # 1,5,8...
postfix: "\t"
- field: field_loop # 自循环的字段。
range: a-z # a|b|c ...
loop: 3 # 循环三次
loopfix: _ # 每次循环的连接符。
postfix: "\t"
- field: field_text # 从一个文件中随机读取。
range: user.txt:R # 相对当前文件路径。
postfix: "\t"
- field: nesting # 字段多层嵌套
fields:
- field: child1
range: a-z
prefix: part1_
postfix: '|'
- field: child2
range: A-Z
prefix: part2_
postfix: "\t"
- field: field_format # 通过格式化字符串输出。
range: 1-10 # passwd 1,passwd 2,passwd 3 ... passwd10。
format: "passwd%02d" # 用%02d补零,使密码整体保持8位。
postfix: "\t"
fields:
- field: field_common # 字段名
range: 1-5,30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: "\t" # 后缀,特殊字符加引号,否则无法解析。
- field: field_step # 区间指定步长。
range: 0-10:2, 1-2:0.1 # 步长可以是整数,也可以是小数。
postfix: "\t"
- field: field_random # 区间指定随机。随机属性R同步长不能同时出现。
range: 1-10:R # 1,5,8...
postfix: "\t"
- field: field_loop # 自循环的字段。
range: a-z # a|b|c ...
loop: 3 # 循环三次
loopfix: _ # 每次循环的连接符。
postfix: "\t"
- field: field_text # 从一个文件中随机读取。
range: user.txt:R # 相对当前文件路径。
postfix: "\t"
- field: nesting # 字段多层嵌套
fields:
- field: child1
range: a-z
prefix: part1_
postfix: '|'
- field: child2
range: A-Z
prefix: part2_
postfix: "\t"
- field: field_format # 通过格式化字符串输出。
range: 1-10 # passwd 1,passwd 2,passwd 3 ... passwd10。
format: "passwd%02d" # 用%02d补零,使密码整体保持8位。
postfix: "\t"
- field: field_length # 指定宽度。
range: 1-99 # 01\t,02\t,03\t..., 99\t
length: 3 # 包含前后缀的宽度。
leftpad: 0 # 宽度不够时,补充的字符。
postfix: "\t"
fields:
- field: field_common # 字段名
range: 1-5,30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: "\t" # 后缀,特殊字符加引号,否则无法解析。
- field: field_step # 区间指定步长。
range: 0-10:2, 1-2:0.1 # 步长可以是整数,也可以是小数。
postfix: "\t"
- field: field_random # 区间指定随机。随机属性R同步长不能同时出现。
range: 1-10:R # 1,5,8...
postfix: "\t"
- field: field_loop # 自循环的字段。
range: a-z # a|b|c ...
loop: 3 # 循环三次
loopfix: _ # 每次循环的连接符。
postfix: "\t"
- field: field_text # 从一个文件中随机读取。
range: user.txt:R # 相对当前文件路径。
postfix: "\t"
- field: nesting # 字段多层嵌套
fields:
- field: child1
range: a-z
prefix: part1_
postfix: '|'
- field: child2
range: A-Z
prefix: part2_
postfix: "\t"
- field: field_format # 通过格式化字符串输出。
range: 1-10 # passwd 1,passwd 2,passwd 3 ... passwd10。
format: "passwd%02d" # 用%02d补零,使密码整体保持8位。
postfix: "\t"
- field: field_length # 指定宽度。
range: 1-99 # 01\t,02\t,03\t..., 99\t
length: 3 # 包含前后缀的宽度。
leftpad: 0 # 宽度不够时,补充的字符。
postfix: "\t"
- field: field_brace # 通过{}定义重复的元素。
range: a{3},[b,c]{3} # a,a,a,b,b,b,c,c,c
postfix: "\t"
fields:
- field: field_common # 字段名
range: 1-5, 30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: "\t" # 后缀,特殊字符加引号,否则无法解析。
- field: field_step # 区间指定步长。
range: 0-10:2, 1-2:0.1 # 步长可以是整数,也可以是小数。
postfix: "\t"
- field: field_random # 区间指定随机。随机属性R同步长不能同时出现。
range: 1-10:R # 1,5,8...
postfix: "\t"
- field: field_loop # 自循环的字段。
range: a-z # a|b|c ...
loop: 1-10 # 循环1次,2次……
loopfix: _ # 每次循环的连接符。
postfix: "\t"
fields:
- field: field_1
range: 10-20
postfix: " "
- field: field_1_md5
range: 10-20
format: md5
prefix: "md5: "
postfix: " "
- field: field_2_sha1
range: 10-20
format: sha1
prefix: "sha1: "
postfix: " "
- field: field_3_base64
range: 10-20
format: base64
prefix: "base64: "
postfix: "\t"
- field: field_4
range: 壹,贰,叁,肆,伍,陆,柒,捌,玖,拾
postfix: "\t"
- field: field_4_urlencode
range: 壹,贰,叁,肆,伍,陆,柒,捌,玖,拾
format: urlencode
prefix: "urlencode: "
postfix: "\t"
fields:
- field: first
range: [1-9]{9}
prefix: ' '
postfix: ' x '
- field: second
range: 1-9
postfix: ' = '
- field: result
value: "$first * $second"
fields:
- field: field_common # 字段名
range: 1-5,30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: "\t" # 后缀,特殊字符加引号,否则无法解析。
- field: field_step # 区间指定步长。
range: 0-10:2, 1-2:0.1 # 步长可以是整数,也可以是小数。
postfix: "\t"
- field: field_random # 区间指定随机。随机属性R同步长不能同时出现。
range: 1-10:R # 1,5,8...
postfix: "\t"
- field: field_loop # 自循环的字段。
range: a-z # a|b|c ...
loop: 3 # 循环三次
loopfix: _ # 每次循环的连接符。
postfix: "\t"
- field: field_text # 从一个文件中随机读取。
range: user.txt:R # 相对当前文件路径。
postfix: "\t"
- field: nesting # 字段多层嵌套
fields:
- field: child1
range: a-z
prefix: part1_
postfix: '|'
- field: child2
range: A-Z
prefix: part2_
postfix: "\t"
- field: field_format # 通过格式化字符串输出。
range: 1-10 # passwd 1,passwd 2,passwd 3 ... passwd10。
format: "passwd%02d" # 用%02d补零,使密码整体保持8位。
postfix: "\t"
- field: field_length # 指定宽度。
range: 1-99 # 01\t,02\t,03\t..., 99\t
length: 3 # 包含前后缀的宽度。
leftpad: 0 # 宽度不够时,补充的字符。
postfix: "\t"
- field: field_use_config # 引用其他的config定义文件。
config: number.yaml # 相对当前文件路径,config内包含单个字段。
postfix: "\t"
fields:
- field: nesting
fields:
- field: child1
range: 1-3
postfix: '_'
- field: child2
range: A-C
postfix: "\t"
- field: nesting_r
mode: r
fields:
- field: child1
range: 1-3
postfix: '_'
- field: child2
range: A-C
postfix: "\t"
fields:
- field: field_common # 字段名
range: 1-5,30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: "\t" # 后缀,特殊字符加引号,否则无法解析。
- field: field_step # 区间指定步长。
range: 0-10:2, 1-2:0.1 # 步长可以是整数,也可以是小数。
postfix: "\t"
- field: field_random # 区间指定随机。随机属性R同步长不能同时出现。
range: 1-10:R # 1,5,8...
postfix: "\t"
- field: field_loop # 自循环的字段。
range: a-z # a|b|c ...
loop: 3 # 循环三次
loopfix: _ # 每次循环的连接符。
postfix: "\t"
- field: field_text # 从一个文件中随机读取。
range: user.txt:R # 相对当前文件路径。
postfix: "\t"
- field: nesting # 字段多层嵌套
fields:
- field: child1
range: a-z
prefix: part1_
postfix: '|'
- field: child2
range: A-Z
prefix: part2_
postfix: "\t"
- field: field_format # 通过格式化字符串输出。
range: 1-10 # passwd 1,passwd 2,passwd 3 ... passwd10。
format: "passwd%02d" # 用%02d补零,使密码整体保持8位。
postfix: "\t"
- field: field_length # 指定宽度。
range: 1-99 # 01\t,02\t,03\t..., 99\t
length: 3 # 包含前后缀的宽度。
leftpad: 0 # 宽度不够时,补充的字符。
postfix: "\t"
- field: field_use_config # 引用其他的config定义文件。
config: number.yaml # 相对当前文件路径,config内包含单个字段。
postfix: "\t"
- field: field_use_ranges_small # 引用內置的定义文件,该文件定义了多个range
from: zentao.number.v1.yaml # 引用yaml/zentao/number/v1.yaml文件里面的ranges定义。
use: small # 使用该文件中定义的small分组。
postfix: "\t"
- field: field_use_ranges_medium
from: zentao.number.v1.yaml
use: medium{4} # 使用该文件中定义的medium分组。
postfix: "\t"
fields:
- field: field_common # 字段名
range: 1-5,30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: "\t" # 后缀,特殊字符加引号,否则无法解析。
- field: field_use_config # 引用其他的config定义文件。
config: number.yaml # 相对当前文件路径,config内包含单个字段。
postfix: "\t"
- field: field_use_ranges # 引用內置的定义文件,该文件定义了多个range
from: zentao.number.v1.yaml # 引用yaml/zentao/number/v1.yaml文件里面的ranges定义。
use: medium # 使用该文件中定义的medium分组。
postfix: "\t"
- field: field_use_instance # 引用其他的定义文件,该文件定义了多个实例。
from: ip.v1.yaml # yaml/ip/v1.yaml
use: privateB{5} # 使用该文件中定义的privateC和privateB两个实例。
postfix: "\t"
fields:
- field: use_mutiple_instances
prefix: ' '
froms:
- from: ip.v1.yaml
use: privateB{10}
- from: ip.v2.yaml
use: ipA{10}
fields:
- field: field_common # 字段名
range: 1-5,30 # 1,2,3,4,5,30,1,2,3,4,5
prefix: "int_" # 前缀
postfix: "\t" # 后缀,特殊字符加引号,否则无法解析。
- field: field_use_config # 引用其他的config定义文件。
config: number.yaml # 相对当前文件路径,config内包含单个字段。
postfix: "\t"
- field: field_use_ranges # 引用內置的定义文件,该文件定义了多个range
from: zentao.number.v1.yaml # 引用yaml/zentao/number/v1.yaml文件里面的ranges定义。
use: medium # 使用该文件中定义的medium分组。
postfix: "\t"
- field: field_use_instance # 引用其他的定义文件,该文件定义了多个实例。
from: ip.v1.yaml # yaml/ip/v1.yaml
use: privateC,privateB # 使用该文件中定义的privateC和privateB两个实例。
postfix: "\t"
- field: field_use_excel # 从excel数据源里面取数据。
from: address.cn.v1.china # 从data/address/v1.xlsx文件中读取名为china的工作簿。
select: city # 查询city字段。
where: state like '%山东%' # 条件是省份包含山东。
rand: true # 随机取数据
postfix: "\t"
fields:
- field: first
range: 16_from_instance.yaml{10}
prefix: "From 16.yaml\t"
postfix: "\t|\t"
- field: second
range: 17_from_excel.yaml{5}
prefix: "From 17.yaml: \t"
fields:
- field: second
range: 100-200
prefix: " I override 18: "
postfix: "\t"
- field: third
range: A-Z
prefix: "I'm a new field: "
from: color.v1.yaml
fields:
- field: rgb
use: rgb
prefix: 'rgb: '
postfix: "\t"
- field: hex
use: hex
prefix: 'hex: '
postfix: "\t"
- field: english
use: english
prefix: 'english: '
postfix: "\t"
- field: chinese
use: chinese
prefix: 'chinese: '
postfix: "\t"
from: country.v1.yaml
fields:
- field: cnfull
use: cnfull
prefix: 'cnfull: '
postfix: "\t"
- field: cnshort
use: cnshort
prefix: 'cnshort: '
postfix: "\t"
- field: asia_enfull
use: asia_enfull
prefix: 'asia_enfull: '
postfix: "\t"
fields:
- field: mixed_at_common
from: domain.domain.v1.yaml
use: mixed_at_common
postfix: "\t"
- field: enaccount_at_common
from: domain.domain.v1.yaml
use: enaccount_at_common
postfix: "\t"
- field: cnaccount_at_cn
from: domain.domain.v1.yaml
use: cnaccount_at_cn
postfix: "\t"
from: email.v1.yaml
fields:
- field: number_with_esp
use: number_with_esp
postfix: "\t"
- field: western_with_esp
use: western_with_esp
postfix: "\t"
- field: pinyin_with_self
use: pinyin_with_self
postfix: "\t"
from: ip.v1.yaml
fields:
- field: privateA
use: privateA
postfix: "\t"
- field: privateB
use: privateB
postfix: "\t"
- field: privateC
use: privateC
postfix: "\t"
fields:
- field: cnaccount
from: name.cnaccount.v1.yaml
use: common
postfix: "\t"
- field: two_chinese_name
from: name.cnreal.v1.yaml
use: two
postfix: "\t"
- field: three_chinese_name
from: name.cnreal.v1.yaml
use: three
postfix: "\t"
- field: four_chinese_name
from: name.cnreal.v1.yaml
use: four
postfix: "\t"
- field: english
from: name.enaccount.v1.yaml
use: common_underline
postfix: "\t"
fields:
- field: date
from: time.date.v1.yaml
use: date
postfix: " "
- field: cn_date
from: time.date.v1.yaml
use: chinese
postfix: " "
- field: time
from: time.time.v1.yaml
use: time
postfix: " "
from: uuid.v1.yaml
fields:
- field: length32_random_no_separator
use: length32_random_no_separator
postfix: " "
- field: length16
use: length16
postfix: " "
title:
desc:
author:
version: 1.0
fields:
- field: t1
range: a-z
postfix: "\t"
- field: WC_SEX
range: sex.txt
#rand: true
postfix: "\t"
- field: t2
range: 1-9
postfix: "\t"
\ No newline at end of file
......@@ -94,10 +94,10 @@ fields:
postfix: "\t"
- field: field_length # 指定宽度。
range: 1-99 # 001\n,002\n,003\n..., 099\n
range: 1-99 # 01\t,02\t,03\t..., 99\t
length: 3 # 包含前后缀的宽度。
leftpad: 0 # 宽度不够时,补充的字符。
postfix: "-"
postfix: "\t"
- field: field_text # 从一个文件中随机读取。
range: users.txt:R # 相对当前文件路径。
......
title: number
desc:
author: wwccss
version: 1.0
fields:
- field: number
range: 1-9
男
\ No newline at end of file
Tom
John
Rose
Jack
Charles
Mark
Bill
Vincent
William
Jseph
James
......@@ -2,13 +2,14 @@ module github.com/easysoft/zendata
go 1.12
require golang.org/x/text v0.3.4
require golang.org/x/text v0.3.5
require (
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.1
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.2
github.com/Chain-Zhang/pinyin v0.1.3
github.com/Knetic/govaluate v3.0.0+incompatible
github.com/akavel/rsrc v0.9.0 // indirect
github.com/andybalholm/brotli v1.0.1 // indirect
github.com/denisenkom/go-mssqldb v0.9.0 // indirect
github.com/elazarl/go-bindata-assetfs v1.0.1
github.com/emirpasic/gods v1.12.0
......@@ -16,32 +17,39 @@ require (
github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect
github.com/go-playground/validator/v10 v10.4.1 // indirect
github.com/golang/protobuf v1.4.3 // indirect
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect
github.com/jinzhu/copier v0.1.0
github.com/golang/snappy v0.0.3 // indirect
github.com/gopherjs/gopherjs v0.0.0-20210202160940-bed99a852dfe // indirect
github.com/jinzhu/copier v0.2.5
github.com/jinzhu/gorm v1.9.16
github.com/jinzhu/now v1.1.1 // indirect
github.com/json-iterator/go v1.1.10 // indirect
github.com/jteeuwen/go-bindata v3.0.7+incompatible // indirect
github.com/klauspost/compress v1.11.12 // indirect
github.com/klauspost/pgzip v1.2.5 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.8.0 // indirect
github.com/mattn/go-runewidth v0.0.9
github.com/lib/pq v1.10.0 // indirect
github.com/mattn/go-runewidth v0.0.10
github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/mholt/archiver/v3 v3.5.0
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/pierrec/lz4/v4 v4.1.3 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/robfig/cron/v3 v3.0.1
github.com/smartystreets/assertions v1.2.0 // indirect
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/stretchr/testify v1.7.0 // indirect
github.com/ugorji/go v1.1.13 // indirect
github.com/xuri/efp v0.0.0-20201016154823-031c29024257 // indirect
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 // indirect
golang.org/x/image v0.0.0-20200927104501-e162460cd6b5 // indirect
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b // indirect
golang.org/x/sys v0.0.0-20201126233918-771906719818 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/xuri/efp v0.0.0-20210128032744-13be4fd5dcb5 // indirect
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb // indirect
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect
golang.org/x/sys v0.0.0-20210308170721-88b6017d0656 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/check.v1 v1.0.0-20201128035030-22ab2dfb190c // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/ini.v1 v1.62.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
)
......@@ -6,6 +6,8 @@ github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.0 h1:tDWYNCJrpNnlNg8mVdlzAzPjl
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.0/go.mod h1:Uwb0d1GgxJieUWZG5WylTrgQ2SrldfjagAxheU8W6MQ=
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.1 h1:j56fC19WoD3z+u+ZHxm2XwRGyS1XmdSMk7058BLhdsM=
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.1/go.mod h1:gXEhMjm1VadSGjAzyDlBxmdYglP8eJpYWxpwJnmXRWw=
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.2 h1:MHu5KWWt28FzRGQgc4Ryj/lZT/W/by4NvsnstbWwkkY=
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.2/go.mod h1:xc0ybJZXcn084ZaIvQv+LfCDQjMWfxkBa2K9nLXYJtI=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Chain-Zhang/pinyin v0.1.3 h1:RzErNyNwVa8z2sOLCuXSOtVdY/AsARb8mBzI2p2qtnE=
github.com/Chain-Zhang/pinyin v0.1.3/go.mod h1:5iHpt9p4znrnaP59/hfPMnAojajkDxQaP9io+tRMPho=
......@@ -17,6 +19,8 @@ github.com/akavel/rsrc v0.9.0 h1:HwUDC0+tMFWqN4D5G+o5siGD4oVsC3jn6zM8ocjc3nY=
github.com/akavel/rsrc v0.9.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c=
github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
github.com/andybalholm/brotli v1.0.1 h1:KqhlKozYbRtJvsPrrEeXcO+N2l6NYT5A2QAFmSULpEc=
github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
github.com/awesome-gocui/gocui v0.6.0 h1:hhDJiQC12tEsJNJ+iZBBVaSSLFYo9llFuYpQlL5JZVI=
github.com/awesome-gocui/gocui v0.6.0/go.mod h1:1QikxFaPhe2frKeKvEwZEIGia3haiOxOUXKinrv17mA=
......@@ -84,6 +88,8 @@ github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
......@@ -94,6 +100,8 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGa
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0=
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherjs v0.0.0-20210202160940-bed99a852dfe h1:rcf1P0fm+1l0EjG16p06mYLj9gW9X36KgdHJ/88hS4g=
github.com/gopherjs/gopherjs v0.0.0-20210202160940-bed99a852dfe/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf h1:WfD7VjIE6z8dIvMsI4/s+1qr5EL+zoIGev1BQj1eoJ8=
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf/go.mod h1:hyb9oH7vZsitZCiBt0ZvifOrB+qc8PS5IiilCIb87rg=
github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a h1:zPPuIq2jAWWPTrGt70eK/BSch+gFAGrNzecsoENgu2o=
......@@ -102,6 +110,8 @@ github.com/jinzhu/copier v0.0.0-20201025035756-632e723a6687 h1:bWXum+xWafUxxJpcX
github.com/jinzhu/copier v0.0.0-20201025035756-632e723a6687/go.mod h1:24xnZezI2Yqac9J61UC6/dG/k76ttpq0DdJI3QmUvro=
github.com/jinzhu/copier v0.1.0 h1:Vh8xALtH3rrKGB/XIRe5d0yCTHPZFauWPLvdpDAbi88=
github.com/jinzhu/copier v0.1.0/go.mod h1:24xnZezI2Yqac9J61UC6/dG/k76ttpq0DdJI3QmUvro=
github.com/jinzhu/copier v0.2.5 h1:Spb+3hARaAN5eeGvqS1YAZflyIz3hCgh6HgvIlDi7U0=
github.com/jinzhu/copier v0.2.5/go.mod h1:24xnZezI2Yqac9J61UC6/dG/k76ttpq0DdJI3QmUvro=
github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o=
github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs=
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
......@@ -123,13 +133,19 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.10.10 h1:a/y8CglcM7gLGYmlbP/stPE5sR3hbhFRUjCBfd/0B3I=
github.com/klauspost/compress v1.10.10/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.11.12 h1:famVnQVu7QwryBN4jNseQdUKES71ZAOnB6UQQJPZvqk=
github.com/klauspost/compress v1.11.12/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/klauspost/pgzip v1.2.4 h1:TQ7CNpYKovDOmqzRHKxJh0BeaBI7UdQZYc6p7pMQh1A=
github.com/klauspost/pgzip v1.2.4/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE=
github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
......@@ -140,6 +156,8 @@ github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4=
github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.8.0 h1:9xohqzkUwzR4Ga4ivdTcawVS89YSDVxXMa3xJX3cGzg=
github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/lib/pq v1.10.0 h1:Zx5DJFEYQXio93kgXnQ09fXNiUKsqv4OUEu2UtGcB1E=
github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE=
......@@ -156,6 +174,8 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRRpdGg=
github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U=
github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
......@@ -179,6 +199,8 @@ github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7
github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
github.com/pierrec/lz4/v4 v4.0.3 h1:vNQKSVZNYUEAvRY9FaUXAF1XPbSOHJtDTiP41kzDz2E=
github.com/pierrec/lz4/v4 v4.0.3/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pierrec/lz4/v4 v4.1.3 h1:/dvQpkb0o1pVlSgKNQqfkavlnXaIK+hJ0LXsKRUN9D4=
github.com/pierrec/lz4/v4 v4.1.3/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
......@@ -188,6 +210,10 @@ github.com/richardlehane/msoleps v1.0.1 h1:RfrALnSNXzmXLbGct/P2b4xkFz4e8Gmj/0Vj9
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 h1:mZHayPoR0lNmnHyvtYjDeq0zlVHn9K/ZXoy17ylucdo=
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5/go.mod h1:GEXHk5HgEKCvEIIrSpFI3ozzG5xOKA2DVlEX/gGnewM=
github.com/rivo/uniseg v0.1.0 h1:+2KBaVoUmb9XzDsrx/Ct0W/EYOSFf/nWTauy++DprtY=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
......@@ -215,6 +241,8 @@ github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgh
github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816 h1:J6v8awz+me+xeb/cUTotKgceAYouhIB3pjzgRd6IlGk=
github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816/go.mod h1:tzym/CEb5jnFI+Q0k4Qq3+LvRF4gO3E2pxS8fHP8jcA=
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
......@@ -228,6 +256,8 @@ github.com/ugorji/go/codec v1.1.13/go.mod h1:oNVt3Dq+FO91WNQ/9JnHKQP2QJxTzoN7wCB
github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
github.com/ulikunitz/xz v0.5.7 h1:YvTNdFzX6+W5m9msiYg/zpkSURPPtOlzbqYjrFn7Yt4=
github.com/ulikunitz/xz v0.5.7/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8=
github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos=
github.com/xuri/efp v0.0.0-20191019043341-b7dc4fe9aa91 h1:gp02YctZuIPTk0t7qI+wvg3VQwTPyNmSGG6ZqOsjSL8=
......@@ -236,6 +266,8 @@ github.com/xuri/efp v0.0.0-20200605144744-ba689101faaf h1:spotWVWg9DP470pPFQ7LaY
github.com/xuri/efp v0.0.0-20200605144744-ba689101faaf/go.mod h1:uBiSUepVYMhGTfDeBKKasV4GpgBlzJ46gXUBAqV8qLk=
github.com/xuri/efp v0.0.0-20201016154823-031c29024257 h1:6ldmGEJXtsRMwdR2KuS3esk9wjVJNvgk05/YY2XmOj0=
github.com/xuri/efp v0.0.0-20201016154823-031c29024257/go.mod h1:uBiSUepVYMhGTfDeBKKasV4GpgBlzJ46gXUBAqV8qLk=
github.com/xuri/efp v0.0.0-20210128032744-13be4fd5dcb5 h1:hO7we8DcWAkmZX/Voqa04Tuo84SbeXIJbdgMj92hIpA=
github.com/xuri/efp v0.0.0-20210128032744-13be4fd5dcb5/go.mod h1:uBiSUepVYMhGTfDeBKKasV4GpgBlzJ46gXUBAqV8qLk=
go.uber.org/dig v1.10.0 h1:yLmDDj9/zuDjv3gz8GQGviXMs9TfysIUMUilCpgzUJY=
go.uber.org/dig v1.10.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
......@@ -244,12 +276,15 @@ golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E=
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9 h1:phUcVbl53swtrUN8kQEXFhUxPlIlWyBfKmidCu7P95o=
golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 h1:xYJJ3S178yv++9zXV/hnr29plCAGO9vAFG9dorqaFQc=
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g=
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/image v0.0.0-20200430140353-33d19683fad8 h1:6WW6V3x1P/jokJBpRQYUJnMHRP6isStQwCozxnU7XQw=
golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
......@@ -258,6 +293,9 @@ golang.org/x/image v0.0.0-20200801110659-972c09e46d76/go.mod h1:FeLwcggjj3mMvU+o
golang.org/x/image v0.0.0-20200922025426-e59bae62ef32/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20200927104501-e162460cd6b5 h1:QelT11PB4FXiDEXucrfNckHoFxwt8USGY1ajP1ZF5lM=
golang.org/x/image v0.0.0-20200927104501-e162460cd6b5/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb h1:fqpd0EBDzlHRCjiphRR5Zo/RSWWQlWv34418dnEixWk=
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
......@@ -280,8 +318,11 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc h1:zK/HqS5bZxDptfPJNq8v7vJfXtkU7r9TLIoSr1bXaP4=
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201016165138-7b1cca2348c0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
......@@ -310,7 +351,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuF
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201126233918-771906719818 h1:f1CIuDlJhwANEC2MM87MBEVMr3jl5bifgsfj90XAF9c=
golang.org/x/sys v0.0.0-20201126233918-771906719818/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210308170721-88b6017d0656 h1:FuBaiPCiXkq4v+JY5JEGPU/HwEZwpVyDbu/KBz9fU+4=
golang.org/x/sys v0.0.0-20210308170721-88b6017d0656/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
......@@ -318,6 +362,8 @@ golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
......@@ -353,6 +399,8 @@ gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLF
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201128035030-22ab2dfb190c h1:3Ao+zLtE2wq/wqnKi1D1nmaRo1n6E9lEVLlXfdDYsQQ=
gopkg.in/check.v1 v1.0.0-20201128035030-22ab2dfb190c/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/ini.v1 v1.55.0 h1:E8yzL5unfpW3M6fz/eB7Cb5MQAYSZ7GKo4Qth+N2sgQ=
gopkg.in/ini.v1 v1.55.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.57.0 h1:9unxIsFcTt4I55uWluz+UmL95q4kdJ0buvQ1ZIqVQww=
......@@ -375,5 +423,7 @@ gopkg.in/yaml.v3 v3.0.0-20200602174320-3e3e88ca92fa h1:5lGs+2OAqZvyIo1XjvoyXoDb8
gopkg.in/yaml.v3 v3.0.0-20200602174320-3e3e88ca92fa/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
......@@ -127,7 +127,7 @@
},
{
"id": "server_request",
"translation": "\nGot %s request %s. "
"translation": "Got %s request %s. "
},
{
"id": "server_response",
......
......@@ -5,12 +5,12 @@ Parameters:
-d --default The default config file for data format.
-c --config The current config file for data format, and it can override the config in the default file.
-o --output The file name of the data generated. You can specify the output format by the extension name.
For example json, xml and sql. The text data in the original format is output by default.
For example json, xml, sql, csv and xlsx. The text data in the original format is output by default.
-n --lines The number of lines of data to be generated. The default is 10.
-F --field This parameter can be used to specify the fields, separated by commas. The default is all fields.
-t --table If the output format is sql, using it to specify the table name to insert data to.
-T --trim Remove the prefix and postfix of every field when outputting data.
-T --trim Remove the prefix and postfix of every field when outputting data or decode data to json string.
-H --human Output a readable format, print the field name, and use the tab key to split.
-r --recursive Recursive mode. The default mode is parallel, in which each field loops independently.
......
......@@ -118,7 +118,7 @@
},
{
"id": "server_request",
"translation": "\n收到%s请求 %s。"
"translation": "收到%s请求 %s。"
},
{
"id": "server_response",
......
......@@ -4,12 +4,12 @@ ZenData是一款通用的数据生成工具,您可以使用yaml文件来定义
-d --default 默认的数据格式配置文件。
-c --config 当前场景的数据格式配置文件,可以覆盖默认文件里面的设置。
-o --output 生成的数据的文件名。可通过扩展名指定输出json|xml|sql格式的数据。默认输出原始格式的文本数据。
-o --output 生成的数据的文件名。可通过扩展名指定输出json|xml|sql|csv|xlsx格式的数据。默认输出原始格式的文本数据。
-n --lines 要生成的记录条数,默认为10条。
-F --field 可通过该参数指定要输出的字段列表,用逗号分隔。 默认是所有的字段。
-t --table 输出格式为sql时,需通过该参数指定要插入数据的表名。
-T --trim 输出的字段去除前后缀,通常用在生成SQL格式的输出
-T --trim 输出的字段去除前后缀,通常用在生成SQL格式输出或解析测试数据时
-H --human 输出可读格式,打印字段名,并使用tab键进行分割。
-r --recursive 递归模式。如不指定,默认为平行模式。平行模式下各个字段独立循环。
递归模式下每个字段的取值依赖于前一字段。可增强数据的随机性。
......@@ -42,7 +42,7 @@ $>zd.exe -d demo\default.yaml -n 100 -o test.sql -t user --trim # 输出针
$>zd.exe -i demo\zentao.sql -o db # 根据sql的定义生成各表的yaml文件,存储到db目录里面。
$>zd.exe -c demo\default.yaml -i test.txt --decode # 将-i指定的文件根据-d参数的配置进行解析。
$>zd.exe -a demo\article.txt -o demo # 转换文章为yaml配置,输出到demo目录下。
$>zd.exe -a demo\article.txt -o demo # 转换文章为yaml配置,输出到demo目录下。
$>zd.exe -l # 列出所有內置数据。
$>zd.exe -v address.cn.v1 # 查看內置Excel文件data/address/cn.v1.xlsx中的数据表。
......
......@@ -4,7 +4,6 @@ import (
"encoding/json"
"github.com/easysoft/zendata/src/model"
fileUtils "github.com/easysoft/zendata/src/utils/file"
i118Utils "github.com/easysoft/zendata/src/utils/i118"
logUtils "github.com/easysoft/zendata/src/utils/log"
"github.com/easysoft/zendata/src/utils/vari"
"os"
......@@ -42,7 +41,7 @@ func Decode(defaultFile, configFile, fieldsToExportStr, input, output string) {
jsonObj, _ := json.Marshal(ret)
vari.JsonResp = string(jsonObj)
logUtils.PrintTo(i118Utils.I118Prt.Sprintf("analyse_success", output))
//logUtils.PrintTo(i118Utils.I118Prt.Sprintf("analyse_success", output))
logUtils.PrintLine(vari.JsonResp)
}
......
......@@ -52,7 +52,7 @@ func loadResForField(field *model.DefField, res *map[string]map[string][]string)
} else if field.From != "" { // refer to res
var valueMap map[string][]string
resFile, resType, sheet := fileUtils.GetResProp(field.From) // relate to current file
resFile, resType, sheet := fileUtils.GetResProp(field.From, field.FileDir) // relate to current file
valueMap, _ = getResValue(resFile, resType, sheet, field)
if (*res)[field.From] == nil {
......@@ -68,7 +68,7 @@ func loadResForField(field *model.DefField, res *map[string]map[string][]string)
}
} else if field.Config != "" { // refer to config
resFile, resType, _ := fileUtils.GetResProp(field.Config)
resFile, resType, _ := fileUtils.GetResProp(field.Config, field.FileDir)
values, _ := getResValue(resFile, resType, "", field)
(*res)[field.Config] = values
}
......@@ -201,14 +201,14 @@ func prepareNestedInstanceRes(insts model.ResInstances, inst model.ResInstancesI
vari.Res[instField.From] = groupedValueReferenced
}
} else if instField.Select != "" { // refer to excel
resFile, resType, sheet := fileUtils.GetResProp(instField.From)
resFile, resType, sheet := fileUtils.GetResProp(instField.From, instField.FileDir)
values, _ := getResValue(resFile, resType, sheet, &instField)
vari.Res[instField.From] = values
}
}
func getReferencedRangeOrInstant(inst model.DefField) (referencedRanges model.ResRanges, referencedInsts model.ResInstances) {
resFile, _, _ := fileUtils.GetResProp(inst.From)
resFile, _, _ := fileUtils.GetResProp(inst.From, inst.FileDir)
yamlContent, err := ioutil.ReadFile(resFile)
yamlContent = stringUtils.ReplaceSpecialChars(yamlContent)
......
......@@ -7,6 +7,7 @@ import (
fileUtils "github.com/easysoft/zendata/src/utils/file"
i118Utils "github.com/easysoft/zendata/src/utils/i118"
logUtils "github.com/easysoft/zendata/src/utils/log"
"github.com/easysoft/zendata/src/utils/vari"
"github.com/mattn/go-runewidth"
"gopkg.in/yaml.v3"
"io/ioutil"
......@@ -14,7 +15,7 @@ import (
)
func ViewRes(res string) {
resPath, resType, sheet := fileUtils.GetResProp(res)
resPath, resType, sheet := fileUtils.GetResProp(res, vari.ZdPath)
if resType == "yaml" {
typ, inst, ranges := ReadYamlData(resPath)
......@@ -59,9 +60,11 @@ func printInst(inst model.ResInstances) {
}
for idx, item := range inst.Instances {
if idx > 0 { msg = msg + "\n" }
if idx > 0 {
msg = msg + "\n"
}
msg = msg + fmt.Sprintf("%d. %s - %s",
idx+1, item.Instance + strings.Repeat(" ", width - runewidth.StringWidth(item.Instance)), item.Note)
idx+1, item.Instance+strings.Repeat(" ", width-runewidth.StringWidth(item.Instance)), item.Note)
}
logUtils.PrintTo(msg)
......@@ -81,8 +84,10 @@ func printRanges(ranges model.ResRanges) {
i := 0
for name, item := range ranges.Ranges {
if i > 0 { msg = msg + "\n" }
msg = msg + fmt.Sprintf("%d. %s - %s", i+1, name + strings.Repeat(" ", width -runewidth.StringWidth(name)), item)
if i > 0 {
msg = msg + "\n"
}
msg = msg + fmt.Sprintf("%d. %s - %s", i+1, name+strings.Repeat(" ", width-runewidth.StringWidth(name)), item)
i++
}
......@@ -115,28 +120,34 @@ func printExcelSheet(path, sheetName string) {
}
widthArr := make([]int, 0)
dataArr := make([][]string, 0)
dataArr := make([][]string, 0)
dataArr = append(dataArr, make([]string, 0))
rows, _ := excel.GetRows(sheet)
colCount := 0
for index, row := range rows {
if index >= 10 { break }
if index >= 10 {
break
}
if index == 0 { // deal with the title
for _, col := range rows[index] {
val := strings.TrimSpace(col)
if val == "" { break }
if val == "" {
break
}
widthArr = append(widthArr, runewidth.StringWidth(val))
dataArr[0]= append(dataArr[0], val)
dataArr[0] = append(dataArr[0], val)
colCount++
}
} else {
colArr := make([]string, 0)
for idx, col := range row {
if idx >= colCount { break }
if idx >= colCount {
break
}
val := strings.TrimSpace(col)
......@@ -155,7 +166,9 @@ func printExcelSheet(path, sheetName string) {
for _, row := range dataArr {
line := ""
for colIdx, col := range row {
if colIdx >= colCount { break }
if colIdx >= colCount {
break
}
space := widthArr[colIdx] - runewidth.StringWidth(col)
line = line + col + strings.Repeat(" ", space) + " "
}
......
......@@ -8,9 +8,9 @@ import (
func TestMod(t *testing.T) {
arrOfArr := [3][]string{}
arrOfArr[0] = []string{"a","b","c","d","e"}
arrOfArr[1] = []string{"1","2"}
arrOfArr[2] = []string{"X","Y","Z"}
arrOfArr[0] = []string{"a", "b", "c", "d", "e"}
arrOfArr[1] = []string{"1", "2"}
arrOfArr[2] = []string{"X", "Y", "Z"}
indexArr := make([]int, 0)
for _, _ = range arrOfArr {
......@@ -26,7 +26,7 @@ func TestMod(t *testing.T) {
indexArr[i] = loop
}
for i := 0; i < 100; i ++ {
for i := 0; i < 100; i++ {
str := strconv.Itoa(i) + ": "
for j := 0; j < len(arrOfArr); j++ {
child := arrOfArr[j]
......@@ -39,4 +39,4 @@ func TestMod(t *testing.T) {
//addCur(&indexArr, arrOfArr)
}
}
\ No newline at end of file
}
......@@ -41,8 +41,8 @@ func TestPinYin(t *testing.T) {
t.Error("fail to convert " + name)
}
pinyin = strings.Replace(pinyin," ", "", -1)
excel.SetCellValue(sheet, "D" + strconv.Itoa(index + 1), pinyin)
pinyin = strings.Replace(pinyin, " ", "", -1)
excel.SetCellValue(sheet, "D"+strconv.Itoa(index+1), pinyin)
//doub := "false"
//lent := ChineseCount(name)
......@@ -60,11 +60,11 @@ func TestPinYin(t *testing.T) {
}
func ChineseCount(str1 string) (count int) {
for _, char := range str1{
if unicode.Is(unicode.Han, char){
for _, char := range str1 {
if unicode.Is(unicode.Han, char) {
count++
}
}
return
}
\ No newline at end of file
}
......@@ -19,4 +19,4 @@ func TestServer(t *testing.T) {
//data.Add("lines", "3")
httpUtils.PostForm(urlStr, data)
}
\ No newline at end of file
}
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册