Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Phodal
Coca
提交
df3ecbda
C
Coca
项目概览
Phodal
/
Coca
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Coca
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
df3ecbda
编写于
7月 20, 2020
作者:
P
Phodal Huang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: add simple convert for visual images
上级
58f9c782
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
3 deletion
+9
-3
cmd/arch.go
cmd/arch.go
+9
-3
未找到文件。
cmd/arch.go
浏览文件 @
df3ecbda
...
...
@@ -2,10 +2,12 @@ package cmd
import
(
"bufio"
"encoding/json"
"github.com/phodal/coca/cmd/cmd_util"
"github.com/phodal/coca/cmd/config"
"github.com/phodal/coca/pkg/application/arch"
"github.com/phodal/coca/pkg/application/arch/tequila"
"github.com/phodal/coca/pkg/application/visual"
"github.com/phodal/coca/pkg/domain/core_domain"
"github.com/spf13/cobra"
"os"
...
...
@@ -17,6 +19,7 @@ type ArchCmdConfig struct {
IsMergePackage
bool
FilterString
string
IsMergeHeader
bool
WithVisual
bool
}
var
(
...
...
@@ -45,9 +48,11 @@ var archCmd = &cobra.Command{
return
false
}
//output := visual.FromDeps(parsedDeps)
//out, _ := json.Marshal(output)
//cmd_util.WriteToCocaFile("visual.json", string(out))
if
archCmdConfig
.
WithVisual
{
output
:=
visual
.
FromDeps
(
parsedDeps
)
out
,
_
:=
json
.
Marshal
(
output
)
cmd_util
.
WriteToCocaFile
(
"visual.json"
,
string
(
out
))
}
if
archCmdConfig
.
IsMergeHeader
{
result
=
result
.
MergeHeaderFile
(
tequila
.
MergeHeaderFunc
)
...
...
@@ -73,5 +78,6 @@ func init() {
archCmd
.
PersistentFlags
()
.
StringVarP
(
&
archCmdConfig
.
DependencePath
,
"dependence"
,
"d"
,
config
.
CocaConfig
.
ReporterPath
+
"/deps.json"
,
"get dependence file"
)
archCmd
.
PersistentFlags
()
.
BoolVarP
(
&
archCmdConfig
.
IsMergePackage
,
"mergePackage"
,
"P"
,
false
,
"merge package"
)
archCmd
.
PersistentFlags
()
.
BoolVarP
(
&
archCmdConfig
.
IsMergeHeader
,
"mergeHeader"
,
"H"
,
false
,
"merge header"
)
archCmd
.
PersistentFlags
()
.
BoolVarP
(
&
archCmdConfig
.
WithVisual
,
"showVisual"
,
"v"
,
false
,
"build visual json"
)
archCmd
.
PersistentFlags
()
.
StringVarP
(
&
archCmdConfig
.
FilterString
,
"filter"
,
"x"
,
""
,
"filter -x com.phodal"
)
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录