From 385f1fb6e7964f4bc8dff385d1d3eabf9dc88259 Mon Sep 17 00:00:00 2001 From: sunty <1172534965@qq.com> Date: 星期五, 01 十一月 2019 17:57:46 +0800 Subject: [PATCH] fix createcluster --- controllers/es.go | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/controllers/es.go b/controllers/es.go index 6302e42..494044f 100644 --- a/controllers/es.go +++ b/controllers/es.go @@ -258,10 +258,8 @@ if err != nil { } - infos := strings.Split(string(out.String()), "\n") - len := len(infos) - res := infos[len-1] - if res == "鏈嶅姟鍚姩鎴愬姛" { + infos := strings.Split(string(out.String()), "\n")[0] + if infos == "鏈嶅姟鍚姩鎴愬姛" { msg = "鍒涘缓鑺傜偣鎴愬姛" util.ResponseFormat(c, code.Success, msg) return -- Gitblit v1.8.0