Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
4b9935da
Z
zendata
项目概览
易企天创
/
zendata
9 个月 前同步成功
通知
17
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zendata
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4b9935da
编写于
5月 21, 2020
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
help
上级
946a5ec2
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
22 addition
and
19 deletion
+22
-19
project1/output.txt
project1/output.txt
+0
-14
res/doc/sample.txt
res/doc/sample.txt
+1
-1
res/doc/usage.txt
res/doc/usage.txt
+1
-1
sample/numb.yaml
sample/numb.yaml
+0
-0
sample/output.txt
sample/output.txt
+15
-0
sample/test.yaml
sample/test.yaml
+0
-0
src/zdata.go
src/zdata.go
+5
-3
未找到文件。
project1/output.txt
已删除
100644 → 0
浏览文件 @
946a5ec2
int_1|2|3 , 192.168.0.1,
int_4|5|6 , 192.168.1.2,
int_7|8|9 , 192.168.2.3,
int_10|11|12 , 192.168.3.4,
int_13|14|15 , 192.168.4.5,
int_16|17|18 , 192.168.5.6,
int_19|20|21 , 192.168.6.7,
int_22|23|24 , 192.168.7.8,
int_25|26|27 , 192.168.8.9,
int_28|29|30 , 192.168.9.10,
int_31|32|33 , 192.168.10.11,
int_34|35|36 , 192.168.11.12,
int_37|38|39 , 192.168.12.13,
int_40|41|42 , 192.168.13.14,
res/doc/sample.txt
浏览文件 @
4b9935da
$>ztf.exe set 根据系统提示,设置工具语言属性。
$>ztf.exe gen -d prj/test.yaml -c 15 -field field1 -o prj/output.txt -f text 执行数据生成命令。使用定义文件prj/test.yaml,生成15行数据,以text格式的输出到prj/output.txt文件中。
\ No newline at end of file
$>ztf.exe gen -d sample/test.yaml -c 15 -field field1 -o sample/output.txt -f text 执行数据生成命令。使用定义文件sample/test.yaml,生成15行数据,以text格式的输出到sample/output.txt文件中。
\ No newline at end of file
res/doc/usage.txt
浏览文件 @
4b9935da
...
...
@@ -6,7 +6,7 @@ gen 根据定义文件生成数据。
-field 指定输入的字段,用逗号分隔
-o -out 指定输出文件
-f format 指定输出格式,支持text、json、xml和sql语句几种格式
-t -table 输出格式为table时,用于指定insert语句的表名
为了方便在任意目录中执行%s命令,建议将其加入环境变量中,具体方法参照以下地址。
https://www.ztesting.net/book/ztf-doc/add-to-path-46.html
\ No newline at end of file
project1
/numb.yaml
→
sample
/numb.yaml
浏览文件 @
4b9935da
文件已移动
sample/output.txt
0 → 100644
浏览文件 @
4b9935da
INSERT INTO t_data(field1,field2) VALUES('int_1|2|3 ', '192.168.0.1,');
INSERT INTO t_data(field1,field2) VALUES('int_4|5|6 ', '192.168.1.2,');
INSERT INTO t_data(field1,field2) VALUES('int_7|8|9 ', '192.168.2.3,');
INSERT INTO t_data(field1,field2) VALUES('int_10|11|12 ', '192.168.3.4,');
INSERT INTO t_data(field1,field2) VALUES('int_13|14|15 ', '192.168.4.5,');
INSERT INTO t_data(field1,field2) VALUES('int_16|17|18 ', '192.168.5.6,');
INSERT INTO t_data(field1,field2) VALUES('int_19|20|21 ', '192.168.6.7,');
INSERT INTO t_data(field1,field2) VALUES('int_22|23|24 ', '192.168.7.8,');
INSERT INTO t_data(field1,field2) VALUES('int_25|26|27 ', '192.168.8.9,');
INSERT INTO t_data(field1,field2) VALUES('int_28|29|30 ', '192.168.9.10,');
INSERT INTO t_data(field1,field2) VALUES('int_31|32|33 ', '192.168.10.11,');
INSERT INTO t_data(field1,field2) VALUES('int_34|35|36 ', '192.168.11.12,');
INSERT INTO t_data(field1,field2) VALUES('int_37|38|39 ', '192.168.12.13,');
INSERT INTO t_data(field1,field2) VALUES('int_40|41|42 ', '192.168.13.14,');
INSERT INTO t_data(field1,field2) VALUES('int_43|44|45 ', '192.168.14.15,');
project1
/test.yaml
→
sample
/test.yaml
浏览文件 @
4b9935da
文件已移动
src/zdata.go
浏览文件 @
4b9935da
...
...
@@ -12,14 +12,13 @@ import (
)
var
(
language
string
def
string
count
int
fields
string
out
string
format
string
table
=
"text"
format
=
"text"
help
bool
flagSet
*
flag
.
FlagSet
...
...
@@ -47,6 +46,9 @@ func main() {
flagSet
.
StringVar
(
&
out
,
"o"
,
""
,
""
)
flagSet
.
StringVar
(
&
out
,
"out"
,
""
,
""
)
flagSet
.
StringVar
(
&
table
,
"t"
,
""
,
""
)
flagSet
.
StringVar
(
&
table
,
"table"
,
""
,
""
)
flagSet
.
StringVar
(
&
format
,
"f"
,
""
,
""
)
flagSet
.
StringVar
(
&
format
,
"format"
,
""
,
""
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录