Skip to content

Commit be9c85a

Browse files
author
pixel
committed
删除无用函数,整洁结构目录
1 parent a8b01b6 commit be9c85a

File tree

5 files changed

+10
-108
lines changed

5 files changed

+10
-108
lines changed

server/main.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import (
44
"gin-vue-admin/core"
55
"gin-vue-admin/global"
66
"gin-vue-admin/gva/init_data"
7-
8-
//"gin-vue-admin/gva/init_data"
97
"gin-vue-admin/initialize"
10-
//"runtime"
118
)
129

1310
// @title Swagger Example API

server/utils/array_to_string.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

server/utils/des.go

Lines changed: 0 additions & 40 deletions
This file was deleted.

server/utils/struct_to_map.go renamed to server/utils/fmt_plus.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package utils
22

3-
import "reflect"
3+
import (
4+
"fmt"
5+
"reflect"
6+
"strings"
7+
)
48

59
// 利用反射将结构体转化为map
610
func StructToMap(obj interface{}) map[string]interface{} {
@@ -13,3 +17,8 @@ func StructToMap(obj interface{}) map[string]interface{} {
1317
}
1418
return data
1519
}
20+
21+
//将数组格式化为字符串
22+
func ArrayToString(array []interface{}) string {
23+
return strings.Replace(strings.Trim(fmt.Sprint(array), "[]"), " ", ",", -1)
24+
}

server/utils/upload_avatar_local.go

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)