feat:update gen

This commit is contained in:
zhangwenjian committed 2020-09-12 01:07:35 +08:00
1 parent 8a7a9db7fd
commit 2d15f91f2e
15 files changed
+220 -256

No files matched your search

+10
View File
@@ -211,3 +211,13 @@ func FileMonitoringById(ctx context.Context, filePth string, id string, group st
go hookfn(ctx, id, group, line)
}
}
// 获取文件大小
func GetFileSize(filename string) int64 {
var result int64
filepath.Walk(filename, func(path string, f os.FileInfo, err error) error {
result = f.Size()
return nil
})
return result
}
+10
View File
@@ -11,6 +11,16 @@ func IdsStrToIdsIntGroup(key string, c *gin.Context) []int {
return IdsStrToIdsIntGroupStr(c.Param(key))
}
type Ids struct {
Ids []int
}
func GetDeleteIds(c *gin.Context) []int {
var ids = new(Ids)
c.Bind(ids)
return ids.Ids
}
func IdsStrToIdsIntGroupStr(keys string) []int {
IDS := make([]int, 0)
ids := strings.Split(keys, ",")