From 2f2f310e0e4c4590670660a5e7e09af8a3f2738f Mon Sep 17 00:00:00 2001 From: klausY Date: Tue, 19 Nov 2019 15:31:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E7=BB=84=E8=BD=AC=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QMPlusServer/tools/array_to_string.go | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 QMPlusServer/tools/array_to_string.go diff --git a/QMPlusServer/tools/array_to_string.go b/QMPlusServer/tools/array_to_string.go new file mode 100644 index 00000000..f4ec2e82 --- /dev/null +++ b/QMPlusServer/tools/array_to_string.go @@ -0,0 +1,10 @@ +package tools + +import ( + "fmt" + "strings" +) + +func ArrayToString(array []interface{}) string { + return strings.Replace(strings.Trim(fmt.Sprint(array), "[]"), " ", ",", -1) +}