feat:update gen
This commit is contained in:
1 parent
8a7a9db7fd
commit
2d15f91f2e
15 files changed
+220
-256
No files matched your search
@@ -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
|
||||
}
|
||||
@@ -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, ",")
|
||||
|
||||
Reference in new issue
Block a user