From a9f0415b618e4f8671834146aeffac4bc4c70c13 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 10 May 2024 09:46:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BD=91=E5=85=83=E4=B8=BB=E6=9C=BAteln?= =?UTF-8?q?et=E5=91=BD=E4=BB=A4=E8=BE=93=E5=85=A5=E7=AC=A6=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/network_element/controller/ne_host.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/network_element/controller/ne_host.go b/src/modules/network_element/controller/ne_host.go index b1700a11..9336733a 100644 --- a/src/modules/network_element/controller/ne_host.go +++ b/src/modules/network_element/controller/ne_host.go @@ -203,7 +203,7 @@ func (s *NeHostController) Test(c *gin.Context) { return } defer client.Close() - if strings.HasSuffix(client.LastResult, "> ") || strings.HasSuffix(client.LastResult, "# ") { + if strings.HasSuffix(client.LastResult, ">") || strings.HasSuffix(client.LastResult, "> ") || strings.HasSuffix(client.LastResult, "# ") { c.JSON(200, result.Ok(nil)) } else { // 连接主机失败,请检查连接参数后重试