优化并发读写限制

This commit is contained in:
GoEdgeLab
2024-05-01 12:42:35 +08:00
parent 2b35971a66
commit c50a0de9eb
5 changed files with 59 additions and 8 deletions

View File

@@ -0,0 +1,17 @@
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package fsutils_test
import (
fsutils "github.com/TeaOSLab/EdgeNode/internal/utils/fs"
"os"
"testing"
)
func TestOpenFile(t *testing.T) {
f, err := fsutils.OpenFile("./os_test.go", os.O_RDONLY, 0444)
if err != nil {
t.Fatal(err)
}
_ = f.Close()
}