From 87b0a27a88b6ec67fc1fc44fc580f6b3698fbf29 Mon Sep 17 00:00:00 2001 From: shaoying Date: Thu, 18 Jun 2020 15:11:02 +0800 Subject: [PATCH] opt cli.runtime --- base/cli/cli.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/base/cli/cli.go b/base/cli/cli.go index 4eb134bd..8032735a 100644 --- a/base/cli/cli.go +++ b/base/cli/cli.go @@ -89,7 +89,14 @@ var Index = &ice.Context{Name: "cli", Help: "命令模块", }}, RUNTIME: {Name: "runtime", Help: "运行环境", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { - m.Cmdy(ice.CTX_CONFIG, RUNTIME, arg) + switch kit.Select("", arg, 0) { + case "hostname": + HostName = arg[1] + m.Conf(RUNTIME, "boot.hostname", arg[1]) + m.Echo(m.Conf(RUNTIME, "boot.hostname")) + default: + m.Cmdy(ice.CTX_CONFIG, RUNTIME, arg) + } }}, }, }