代码拉取完成,页面将自动刷新
package cmd
import (
"github.com/fatih/color"
ansi "github.com/k0kubun/go-ansi"
"github.com/xalanq/cf-tool/client"
"github.com/xalanq/cf-tool/config"
"github.com/xalanq/cf-tool/util"
)
// Config command
func Config() (err error) {
cfg := config.Instance
cln := client.Instance
color.Cyan("Configure the tool")
ansi.Println(`0) login`)
ansi.Println(`1) add a template`)
ansi.Println(`2) delete a template`)
ansi.Println(`3) set default template`)
ansi.Println(`4) run "cf gen" after "cf parse"`)
ansi.Println(`5) set host domain`)
ansi.Println(`6) set proxy`)
ansi.Println(`7) set folders' name`)
index := util.ChooseIndex(8)
if index == 0 {
return cln.ConfigLogin()
} else if index == 1 {
return cfg.AddTemplate()
} else if index == 2 {
return cfg.RemoveTemplate()
} else if index == 3 {
return cfg.SetDefaultTemplate()
} else if index == 4 {
return cfg.SetGenAfterParse()
} else if index == 5 {
return cfg.SetHost()
} else if index == 6 {
return cfg.SetProxy()
} else if index == 7 {
return cfg.SetFolderName()
}
return
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。