23 lines
361 B
Go
23 lines
361 B
Go
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)
|
|
}
|