由gopath形式改为module

This commit is contained in:
kongyuebin
2021-04-27 15:33:49 +08:00
parent aef4dbb33c
commit 77d895e83a
1117 changed files with 332447 additions and 20 deletions

26
shop/utils/sort_go.go Normal file
View File

@@ -0,0 +1,26 @@
/***************************************************
** @Desc : This file for ...
** @Time : 2019/10/26 11:17
** @Author : yuebin
** @File : sort_go
** @Last Modified by : yuebin
** @Last Modified time: 2019/10/26 11:17
** @Software: GoLand
****************************************************/
package utils
import (
"sort"
)
/*
* 对map的key值进行排序
*/
func SortMap(m map[string]string) []string {
var arr []string
for k := range m {
arr = append(arr, k)
}
sort.Strings(arr)
return arr
}