- 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
16 lines
256 B
Go
16 lines
256 B
Go
package os
|
|
|
|
import (
|
|
"io"
|
|
nativeos "os"
|
|
)
|
|
|
|
//go:generate mockgen -destination=mock_$GOPACKAGE/$GOFILE . File
|
|
|
|
type File interface {
|
|
io.ReadWriteCloser
|
|
WriteString(s string) (int, error)
|
|
Chown(uid, gid int) error
|
|
Chmod(mode nativeos.FileMode) error
|
|
}
|