mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
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) {
|
RUNTIME: {Name: "runtime", Help: "运行环境", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
switch kit.Select("", arg, 0) {
|
switch kit.Select("", arg, 0) {
|
||||||
|
case "hostinfo":
|
||||||
case "hostname":
|
case "hostname":
|
||||||
m.Conf(RUNTIME, "boot.hostname", arg[1])
|
m.Conf(RUNTIME, "boot.hostname", arg[1])
|
||||||
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) {
|
func _table_show(m *ice.Message, name, text string, arg ...string) {
|
||||||
head, list := []string{}, [][]string{}
|
head, list := []string{}, [][]string{}
|
||||||
for i, v := range kit.Split(strings.TrimSpace(text), "\n") {
|
for i, v := range kit.Split(strings.TrimSpace(text), "\n") {
|
||||||
if i == 0 {
|
if v = strings.ReplaceAll(v, "%", "%%"); i == 0 {
|
||||||
head = kit.Split(v)
|
head = kit.Split(v)
|
||||||
} else {
|
} else {
|
||||||
line := kit.Split(v)
|
line := kit.Split(v)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user