From aeaedea5801778678c9b592d7b4179e8e36ac7cd Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 29 Nov 2021 00:32:05 +0800 Subject: [PATCH] fix unit-test bug --- engine/process.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engine/process.go b/engine/process.go index 51df5a18..e7c23064 100644 --- a/engine/process.go +++ b/engine/process.go @@ -18,13 +18,18 @@ func init() { // processCreate 运行模型 MustCreate func processPing(process *gou.Process) interface{} { + var input interface{} + if process.NumOfArgs() > 0 { + input = process.Args[0] + } + res := map[string]interface{}{ "code": 200, "server": "象传应用引擎", "version": share.VERSION, "domain": share.DOMAIN, "allows": config.Conf.Service.Allow, - "args": process.Args[0], + "args": input, } return res }