Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
c0bf6ab8
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 搜索 >>
提交
c0bf6ab8
编写于
5月 21, 2020
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
data file version support
上级
d7bb6d9a
变更
15
展开全部
隐藏空白更改
内联
并排
Showing
15 changed file
with
3944 addition
and
53 deletion
+3944
-53
data/system/address/v1.xlsx
data/system/address/v1.xlsx
+0
-0
data/system/buildin.yaml
data/system/buildin.yaml
+0
-9
data/system/domain.txt
data/system/domain.txt
+0
-4
data/system/ip/v1.yaml
data/system/ip/v1.yaml
+0
-0
demo/output.txt
demo/output.txt
+14
-15
demo/test.yaml
demo/test.yaml
+2
-2
res/messages_en.json
res/messages_en.json
+4
-12
res/messages_zh.json
res/messages_zh.json
+1
-5
src/action/generator.go
src/action/generator.go
+1
-1
src/action/output.go
src/action/output.go
+0
-3
src/gen/res.go
src/gen/res.go
+2
-2
xdoc/test/apachelog.yaml
xdoc/test/apachelog.yaml
+0
-0
xdoc/test/data.xlsx
xdoc/test/data.xlsx
+0
-0
xdoc/test/data.yaml
xdoc/test/data.yaml
+0
-0
xdoc/test/zentao.sql
xdoc/test/zentao.sql
+3920
-0
未找到文件。
data/system/address.xlsx
→
data/system/address
/v1
.xlsx
浏览文件 @
c0bf6ab8
文件已移动
data/system/buildin.yaml
已删除
100644 → 0
浏览文件 @
d7bb6d9a
title
:
域名
desc
:
从文件读取
author
:
wwccss
version
:
1.0
field
:
domain
instances
:
-
instance
:
all
range
:
domain.txt:R
\ No newline at end of file
data/system/domain.txt
已删除
100644 → 0
浏览文件 @
d7bb6d9a
zentao.com
ngtesting.net
ngtesting.com
testfarm.net
\ No newline at end of file
data/system/ip.yaml
→
data/system/ip
/v1
.yaml
浏览文件 @
c0bf6ab8
文件已移动
demo/output.txt
浏览文件 @
c0bf6ab8
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,');
192.168.0.1,
192.168.1.2,
192.168.2.3,
192.168.3.4,
192.168.4.5,
192.168.5.6,
192.168.6.7,
192.168.7.8,
192.168.8.9,
192.168.9.10,
192.168.10.11,
192.168.11.12,
192.168.12.13,
192.168.13.14,
demo/test.yaml
浏览文件 @
c0bf6ab8
...
...
@@ -11,12 +11,12 @@ fields:
-
field
:
field2
note
:
测试系统字段
from
:
system.ip.yaml
from
:
system.ip.
v1.
yaml
use
:
privateC,privateB
-
field
:
field3
note
:
测试Excel数据
from
:
system.address.city
from
:
system.address.
v1.
city
select
:
name
where
:
state like '%山东%'
...
...
res/messages_en.json
浏览文件 @
c0bf6ab8
...
...
@@ -42,27 +42,19 @@
{
"id"
:
"generate_records"
,
"translation"
:
"Generate %d records, spend %d secs"
},
{
"id"
:
"save_testdata"
,
"translation"
:
"Test data saved to %s"
"translation"
:
"Generate %d records to file %s, spend %d secs."
},
{
"id"
:
"fail_to_connect_sqlite"
,
"translation"
:
"fail to open SQLite %s, error: %s"
"translation"
:
"fail to open SQLite %s, error: %s
.
"
},
{
"id"
:
"fail_to_exec_query"
,
"translation"
:
"fail to exec query %s
"
"translation"
:
"fail to exec query %s
.
"
},
{
"id"
:
"fail_to_parse_row"
,
"translation"
:
"fail to parse sqlite3 row %s"
},
{
"id"
:
"fail_to_update_row"
,
"translation"
:
"fail to insert/update row: "
"translation"
:
"fail to parse sqlite3 row %s."
},
{
"id"
:
"fail_to_save_excel"
,
...
...
res/messages_zh.json
浏览文件 @
c0bf6ab8
...
...
@@ -37,11 +37,7 @@
{
"id"
:
"generate_records"
,
"translation"
:
"生成%d个记录,耗时%d秒。"
},
{
"id"
:
"save_testdata"
,
"translation"
:
"成功保存生成的数据到%s。"
"translation"
:
"生成%d个记录到文件%s,耗时%d秒。"
},
{
"id"
:
"fail_to_connect_sqlite"
,
...
...
src/action/generator.go
浏览文件 @
c0bf6ab8
...
...
@@ -30,7 +30,7 @@ func Generate(defFile string, total int, fieldsToExportStr string, out string, f
WriteToFile
(
out
,
content
)
entTime
:=
time
.
Now
()
.
Unix
()
logUtils
.
Screen
(
i118Utils
.
I118Prt
.
Sprintf
(
"generate_records"
,
len
(
rows
),
entTime
-
startTime
))
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
{
...
...
src/action/output.go
浏览文件 @
c0bf6ab8
...
...
@@ -2,11 +2,8 @@ package action
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"
)
func
WriteToFile
(
path
string
,
content
string
)
{
fileUtils
.
WriteFile
(
path
,
content
)
logUtils
.
Screen
(
i118Utils
.
I118Prt
.
Sprintf
(
"save_testdata"
,
path
))
}
src/gen/res.go
浏览文件 @
c0bf6ab8
...
...
@@ -46,13 +46,13 @@ func getResProp(from string) (string, string) {
sep
:=
string
(
os
.
PathSeparator
)
index
:=
strings
.
LastIndex
(
from
,
".yaml"
)
if
index
>
-
1
{
// yaml, system.
nubmer
.yaml
if
index
>
-
1
{
// yaml, system.
ip.v1
.yaml
left
:=
from
[
:
index
]
left
=
strings
.
ReplaceAll
(
left
,
"."
,
sep
)
resFile
=
left
+
".yaml"
resType
=
"yaml"
}
else
{
// excel, system.address.
china
}
else
{
// excel, system.address.
v1.city
index
=
strings
.
LastIndex
(
from
,
"."
)
left
:=
from
[
:
index
]
...
...
xdoc/apachelog.yaml
→
xdoc/
test/
apachelog.yaml
浏览文件 @
c0bf6ab8
文件已移动
data
/data.xlsx
→
xdoc/test
/data.xlsx
浏览文件 @
c0bf6ab8
文件已移动
xdoc/data.yaml
→
xdoc/
test/
data.yaml
浏览文件 @
c0bf6ab8
文件已移动
xdoc/test/zentao.sql
0 → 100644
浏览文件 @
c0bf6ab8
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录