Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
3078f652
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
11 个月 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
3078f652
编写于
9月 02, 2019
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename stdin related method
上级
0bdedcfc
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
14 addition
and
14 deletion
+14
-14
src/action/bug.go
src/action/bug.go
+1
-1
src/action/gen.go
src/action/gen.go
+2
-2
src/action/result.go
src/action/result.go
+1
-1
src/action/run.go
src/action/run.go
+2
-2
src/atf.go
src/atf.go
+1
-1
src/utils/stdin/stdin.go
src/utils/stdin/stdin.go
+7
-7
未找到文件。
src/action/bug.go
浏览文件 @
3078f652
...
...
@@ -21,7 +21,7 @@ func CommitBug(files []string) {
if
len
(
files
)
>
0
{
resultDir
=
files
[
0
]
}
else
{
stdinUtils
.
Config
ForDir
(
&
resultDir
,
"result"
)
stdinUtils
.
Input
ForDir
(
&
resultDir
,
"result"
)
}
resultDir
=
fileUtils
.
UpdateDir
(
resultDir
)
...
...
src/action/gen.go
浏览文件 @
3078f652
...
...
@@ -14,12 +14,12 @@ import (
func
Generate
(
productId
string
,
moduleId
string
,
suiteId
string
,
taskId
string
,
independentFile
bool
,
scriptLang
string
)
{
stdinUtils
.
Check
ConfigForRequest
()
stdinUtils
.
Check
RequestConfig
()
if
(
productId
!=
""
)
||
(
moduleId
!=
""
&&
productId
!=
""
)
||
suiteId
!=
""
||
taskId
!=
""
{
}
else
{
stdinUtils
.
Config
ForCheckout
(
&
productId
,
&
moduleId
,
&
suiteId
,
&
taskId
,
stdinUtils
.
Input
ForCheckout
(
&
productId
,
&
moduleId
,
&
suiteId
,
&
taskId
,
&
independentFile
,
&
scriptLang
)
}
...
...
src/action/result.go
浏览文件 @
3078f652
...
...
@@ -11,7 +11,7 @@ func CommitResult(files []string) {
if
len
(
files
)
>
0
{
resultDir
=
files
[
0
]
}
else
{
stdinUtils
.
Config
ForDir
(
&
resultDir
,
"result"
)
stdinUtils
.
Input
ForDir
(
&
resultDir
,
"result"
)
}
resultDir
=
fileUtils
.
UpdateDir
(
resultDir
)
...
...
src/action/run.go
浏览文件 @
3078f652
...
...
@@ -28,7 +28,7 @@ func Run(files []string, suiteIdStr string, taskIdStr string) {
suiteId
,
err
:=
strconv
.
Atoi
(
suiteIdStr
)
if
err
==
nil
&&
suiteId
>
0
{
stdinUtils
.
Check
ConfigForRequest
()
stdinUtils
.
Check
RequestConfig
()
zentaoService
.
GetCaseIdsBySuite
(
suiteIdStr
,
&
caseIdMap
)
}
...
...
@@ -37,7 +37,7 @@ func Run(files []string, suiteIdStr string, taskIdStr string) {
taskId
,
err
:=
strconv
.
Atoi
(
taskIdStr
)
if
err
==
nil
&&
taskId
>
0
{
stdinUtils
.
Check
ConfigForRequest
()
stdinUtils
.
Check
RequestConfig
()
zentaoService
.
GetCaseIdsByTask
(
taskIdStr
,
&
caseIdMap
)
}
...
...
src/atf.go
浏览文件 @
3078f652
...
...
@@ -108,7 +108,7 @@ func main() {
}
case
"set"
,
"-s"
:
stdinUtils
.
Config
ForSet
()
stdinUtils
.
Input
ForSet
()
case
"help"
,
"-h"
:
logUtils
.
PrintUsage
()
...
...
src/utils/stdin/stdin.go
浏览文件 @
3078f652
...
...
@@ -13,7 +13,7 @@ import (
"strings"
)
func
Config
ForSet
()
{
func
Input
ForSet
()
{
configSite
:=
""
language
:=
""
...
...
@@ -51,14 +51,14 @@ func ConfigForSet() {
configUtils
.
PrintCurrConfig
()
}
func
Check
ConfigForRequest
()
{
func
Check
RequestConfig
()
{
conf
:=
configUtils
.
ReadCurrConfig
()
if
conf
.
Url
==
""
||
conf
.
Account
==
""
||
conf
.
Password
==
""
{
Config
ForRequest
()
Input
ForRequest
()
}
}
func
Config
ForRequest
()
{
func
Input
ForRequest
()
{
url
:=
""
account
:=
""
password
:=
""
...
...
@@ -74,7 +74,7 @@ func ConfigForRequest() {
configUtils
.
PrintCurrConfig
()
}
func
Config
ForCheckout
(
productId
*
string
,
moduleId
*
string
,
suiteId
*
string
,
taskId
*
string
,
func
Input
ForCheckout
(
productId
*
string
,
moduleId
*
string
,
suiteId
*
string
,
taskId
*
string
,
independentFile
*
bool
,
scriptLang
*
string
)
{
coType
:=
getInput
(
"(product|module|suite|task|p|m|s|t)"
,
"enter_co_type"
)
...
...
@@ -109,11 +109,11 @@ func ConfigForCheckout(productId *string, moduleId *string, suiteId *string, tas
configUtils
.
PrintCurrConfig
()
}
func
Config
ForDir
(
dir
*
string
,
entity
string
)
{
func
Input
ForDir
(
dir
*
string
,
entity
string
)
{
*
dir
=
getInput
(
"is_dir"
,
"enter_dir"
,
i118Utils
.
I118Prt
.
Sprintf
(
entity
))
}
func
Config
ForInt
(
in
*
string
,
entity
string
)
{
func
Input
ForInt
(
in
*
string
,
entity
string
)
{
*
in
=
getInput
(
"
\\
d+"
,
"enter_id"
,
i118Utils
.
I118Prt
.
Sprintf
(
entity
))
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录