forked from x/icebergs
opt some
This commit is contained in:
parent
e154b0fa18
commit
7b99b1cc29
@ -2,7 +2,7 @@ package wiki
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"path"
|
||||||
|
|
||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
"shylinux.com/x/icebergs/base/lex"
|
"shylinux.com/x/icebergs/base/lex"
|
||||||
@ -23,7 +23,9 @@ func init() {
|
|||||||
_wiki_upload(m, m.CommandKey(), m.Option(nfs.PATH))
|
_wiki_upload(m, m.CommandKey(), m.Option(nfs.PATH))
|
||||||
}},
|
}},
|
||||||
mdb.REMOVE: {Name: "remove", Help: "删除", Hand: func(m *ice.Message, arg ...string) {
|
mdb.REMOVE: {Name: "remove", Help: "删除", Hand: func(m *ice.Message, arg ...string) {
|
||||||
os.Remove(strings.TrimPrefix(arg[0], web.SHARE_LOCAL))
|
p := path.Join(m.Config(nfs.PATH), path.Join(arg...))
|
||||||
|
m.Debug("remove %v", p)
|
||||||
|
os.Remove(p)
|
||||||
}},
|
}},
|
||||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
_wiki_list(m, m.CommandKey(), kit.Select(nfs.PWD, arg, 0))
|
_wiki_list(m, m.CommandKey(), kit.Select(nfs.PWD, arg, 0))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user