Documentation
¶
Overview ¶
Package aferomock provides mock for spf13/afero.
Index ¶
- Variables
- type FileInfo
- type FileInfoMocker
- type Fs
- func (f *Fs) Chmod(name string, mode os.FileMode) error
- func (f *Fs) Chown(name string, uid, gid int) error
- func (f *Fs) Chtimes(name string, atime time.Time, mtime time.Time) error
- func (f *Fs) Create(name string) (afero.File, error)
- func (f *Fs) Mkdir(name string, perm os.FileMode) error
- func (f *Fs) MkdirAll(path string, perm os.FileMode) error
- func (f *Fs) Name() string
- func (f *Fs) Open(name string) (afero.File, error)
- func (f *Fs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)
- func (f *Fs) Remove(name string) error
- func (f *Fs) RemoveAll(path string) error
- func (f *Fs) Rename(oldname, newname string) error
- func (f *Fs) Stat(name string) (os.FileInfo, error)
- type FsMocker
Constants ¶
This section is empty.
Variables ¶
View Source
var NoMockFileInfo = MockFileInfo()
NoMockFileInfo is no mock FileInfo.
View Source
var NoMockFs = MockFs()
NoMockFs is no mock Fs.
Functions ¶
This section is empty.
Types ¶
type FileInfo ¶
FileInfo is a os.FileInfo.
func NewFileInfo ¶
NewFileInfo mocks os.FileInfo interface.
type FileInfoMocker ¶
FileInfoMocker is FileInfo mocker.
func MockFileInfo ¶
func MockFileInfo(mocks ...func(i *FileInfo)) FileInfoMocker
MockFileInfo creates FileInfo mock with cleanup to ensure all the expectations are met.