mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
opt some
This commit is contained in:
parent
2a6e445d80
commit
30208298cb
@ -137,6 +137,10 @@ func init() {
|
||||
switch arg[0] {
|
||||
case cli.MAIN:
|
||||
m.Cmdy(nfs.DIR, ice.SRC, nfs.DIR_CLI_FIELDS, kit.Dict(nfs.DIR_REG, `.*\.go`)).ProcessAgain()
|
||||
case mdb.ZONE:
|
||||
m.Option(nfs.DIR_ROOT, ice.SRC)
|
||||
m.Option(nfs.DIR_TYPE, nfs.DIR)
|
||||
m.Cmdy(nfs.DIR, nfs.PWD, mdb.NAME).RenameAppend(mdb.NAME, mdb.ZONE)
|
||||
case nfs.PATH:
|
||||
m.Cmdy(nfs.DIR, arg[1:], nfs.DIR_CLI_FIELDS).ProcessAgain()
|
||||
case nfs.FILE:
|
||||
|
3
misc.go
3
misc.go
@ -94,6 +94,9 @@ func (m *Message) FieldsIsDetail() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *Message) PushDetail(value interface{}, arg ...interface{}) *Message {
|
||||
return m.Push("detail", value, arg...)
|
||||
}
|
||||
func (m *Message) IsErr(arg ...string) bool {
|
||||
return len(arg) > 0 && m.Result(1) == arg[0] || m.Result(0) == ErrWarn
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ func init() {
|
||||
}},
|
||||
|
||||
ADD: {Name: "add", Help: "添加", Hand: func(m *ice.Message, arg ...string) {
|
||||
_repos_cmd(m, m.Option(REPOS), ADD, m.Option(nfs.FILE))
|
||||
_repos_cmd(m, m.Option(REPOS), ADD, m.Option(nfs.FILE)).SetAppend()
|
||||
}}, OPT: {Name: "opt", Help: "优化"}, PRO: {Name: "pro", Help: "升级"},
|
||||
COMMIT: {Name: "commit action=opt,add,pro comment=some@key", Help: "提交", Hand: func(m *ice.Message, arg ...string) {
|
||||
if arg[0] == ctx.ACTION {
|
||||
|
Loading…
x
Reference in New Issue
Block a user