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
|
||||
}
|
||||
Reference in new issue
Block a user