From b8a47fbf1d0f1f5545c85c416d84155ba26034e7 Mon Sep 17 00:00:00 2001 From: bryanqiu Date: Thu, 13 Oct 2022 09:09:55 +0800 Subject: [PATCH] rename MapKeys --- str.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/str.go b/str.go index c77b0e7..72c8661 100644 --- a/str.go +++ b/str.go @@ -64,8 +64,8 @@ func SkipLine(s string, n int) string { return Skip(s, "\n", n) } -// get a map keys as array. -func MapKeys(imap interface{}) (keys []string) { +// get a map's keys as array. +func MapsKeys(imap interface{}) (keys []string) { switch imap.(type) { case map[string]string: m := imap.(map[string]string) @@ -83,9 +83,9 @@ func MapKeys(imap interface{}) (keys []string) { return keys } -// get a map keys and join to string. -func KeysString(imap interface{}) string { - keys := Keys(imap) +// get a map's keys and join it to string. +func MapsKeysString(imap interface{}) string { + keys := MapsKeys(imap) return strings.Join(keys, ",") }