Code maintenance: OS package for file system
- OS custom internal package for file system interaction - Remove fileManager external dependency - Closer API to Go's native API on the OS - Create directories at startup - Better testability - Move Unsetenv to os interface
This commit is contained in:
10
internal/os/funcs.go
Normal file
10
internal/os/funcs.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package os
|
||||
|
||||
import (
|
||||
nativeos "os"
|
||||
)
|
||||
|
||||
type OpenFileFunc func(name string, flag int, perm FileMode) (File, error)
|
||||
type MkdirAllFunc func(name string, perm nativeos.FileMode) error
|
||||
type RemoveFunc func(name string) error
|
||||
type ChownFunc func(name string, uid int, gid int) error
|
||||
Reference in New Issue
Block a user