NewOsFs: return an interface and not a pointer
This commit is contained in:
parent
3f75d46a16
commit
b006c5f914
3 changed files with 3 additions and 4 deletions
|
@ -82,7 +82,7 @@ Stream|Baseline MB/s|Devel MB/s|Optimized MB/s|Balanced MB/s|OpenSSH MB/s|
|
|||
4|576|836|1080|1099|1569|
|
||||
8|857|1161|1416|1433|2271|
|
||||
|
||||
#### Cipher aes128gcm@openssh.com
|
||||
#### Cipher aes128-gcm@openssh.com
|
||||
|
||||
With this cipher the messages authentication is implicit, no SHA256 computation is needed.
|
||||
|
||||
|
|
|
@ -3862,8 +3862,7 @@ func TestResolveVirtualPaths(t *testing.T) {
|
|||
MappedPath: mappedPath,
|
||||
})
|
||||
os.MkdirAll(mappedPath, 0777)
|
||||
fs := vfs.NewOsFs("", user.GetHomeDir(), user.VirtualFolders)
|
||||
osFs := fs.(*vfs.OsFs)
|
||||
osFs := vfs.NewOsFs("", user.GetHomeDir(), user.VirtualFolders).(vfs.OsFs)
|
||||
b, f := osFs.GetFsPaths("/vdir/a.txt")
|
||||
if b != mappedPath {
|
||||
t.Errorf("unexpected base path: %#v expected: %#v", b, mappedPath)
|
||||
|
|
|
@ -29,7 +29,7 @@ type OsFs struct {
|
|||
|
||||
// NewOsFs returns an OsFs object that allows to interact with local Os filesystem
|
||||
func NewOsFs(connectionID, rootDir string, virtualFolders []VirtualFolder) Fs {
|
||||
return &OsFs{
|
||||
return OsFs{
|
||||
name: osFsName,
|
||||
connectionID: connectionID,
|
||||
rootDir: rootDir,
|
||||
|
|
Loading…
Add table
Reference in a new issue