Initial commit
This commit is contained in:
22
io.go
Normal file
22
io.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package cv
|
||||
|
||||
import (
|
||||
"github.com/spf13/afero"
|
||||
"os"
|
||||
)
|
||||
|
||||
type fsReader struct{
|
||||
fs afero.Fs
|
||||
}
|
||||
|
||||
func (f *fsReader) ReadFile(path string) ([]byte, error) {
|
||||
return afero.ReadFile(f.fs, path)
|
||||
}
|
||||
|
||||
type fsWriter struct {
|
||||
fs afero.Fs
|
||||
}
|
||||
|
||||
func (f *fsWriter) WriteFile(path string, data []byte, mode os.FileMode) error {
|
||||
return afero.WriteFile(f.fs, path, data, mode)
|
||||
}
|
||||
Reference in New Issue
Block a user