forked from x/icebergs
opt some
This commit is contained in:
parent
7d3dcb2670
commit
05ad115ec8
@ -94,6 +94,7 @@ var Index = &ice.Context{Name: "cli", Help: "命令模块",
|
||||
|
||||
RUNTIME: {Name: "runtime", Help: "运行环境", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
switch kit.Select("", arg, 0) {
|
||||
case "hostinfo":
|
||||
case "hostname":
|
||||
m.Conf(RUNTIME, "boot.hostname", arg[1])
|
||||
HostName = arg[1]
|
||||
|
@ -211,7 +211,7 @@ func _order_show(m *ice.Message, name, text string, arg ...string) {
|
||||
func _table_show(m *ice.Message, name, text string, arg ...string) {
|
||||
head, list := []string{}, [][]string{}
|
||||
for i, v := range kit.Split(strings.TrimSpace(text), "\n") {
|
||||
if i == 0 {
|
||||
if v = strings.ReplaceAll(v, "%", "%%"); i == 0 {
|
||||
head = kit.Split(v)
|
||||
} else {
|
||||
line := kit.Split(v)
|
||||
|
Loading…
x
Reference in New Issue
Block a user