Run go fmt
This commit is contained in:
parent
20b058a333
commit
ce42a6f23d
@ -11,15 +11,15 @@ import (
|
|||||||
// A simple one-entry DirIV cache
|
// A simple one-entry DirIV cache
|
||||||
type DirIVCache struct {
|
type DirIVCache struct {
|
||||||
// Invalidated?
|
// Invalidated?
|
||||||
cleared bool
|
cleared bool
|
||||||
// The DirIV
|
// The DirIV
|
||||||
iv []byte
|
iv []byte
|
||||||
// Directory the DirIV belongs to
|
// Directory the DirIV belongs to
|
||||||
dir string
|
dir string
|
||||||
// Ecrypted version of "dir"
|
// Ecrypted version of "dir"
|
||||||
translatedDir string
|
translatedDir string
|
||||||
// Synchronisation
|
// Synchronisation
|
||||||
lock sync.RWMutex
|
lock sync.RWMutex
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *DirIVCache) lookup(dir string) (bool, []byte, string) {
|
func (c *DirIVCache) lookup(dir string) (bool, []byte, string) {
|
||||||
|
@ -3,9 +3,9 @@ package integration_tests
|
|||||||
// Mount example filesystems and check that the file "status.txt" is there
|
// Mount example filesystems and check that the file "status.txt" is there
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"path/filepath"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
8
main.go
8
main.go
@ -283,11 +283,11 @@ func pathfsFrontend(key []byte, args argContainer, confFile *cryptfs.ConfFile) *
|
|||||||
// Reconciliate CLI and config file arguments into a Args struct that is passed to the
|
// Reconciliate CLI and config file arguments into a Args struct that is passed to the
|
||||||
// filesystem implementation
|
// filesystem implementation
|
||||||
frontendArgs := pathfs_frontend.Args{
|
frontendArgs := pathfs_frontend.Args{
|
||||||
Cipherdir: args.cipherdir,
|
Cipherdir: args.cipherdir,
|
||||||
Masterkey: key,
|
Masterkey: key,
|
||||||
OpenSSL: args.openssl,
|
OpenSSL: args.openssl,
|
||||||
PlaintextNames: args.plaintextnames,
|
PlaintextNames: args.plaintextnames,
|
||||||
DirIV: args.diriv,
|
DirIV: args.diriv,
|
||||||
}
|
}
|
||||||
// confFile is nil when "-zerokey" or "-masterkey" was used
|
// confFile is nil when "-zerokey" or "-masterkey" was used
|
||||||
if confFile != nil {
|
if confFile != nil {
|
||||||
|
@ -2,9 +2,9 @@ package pathfs_frontend
|
|||||||
|
|
||||||
// Container for arguments that are passed from main() to pathfs_frontend
|
// Container for arguments that are passed from main() to pathfs_frontend
|
||||||
type Args struct {
|
type Args struct {
|
||||||
Masterkey []byte
|
Masterkey []byte
|
||||||
Cipherdir string
|
Cipherdir string
|
||||||
OpenSSL bool
|
OpenSSL bool
|
||||||
PlaintextNames bool
|
PlaintextNames bool
|
||||||
DirIV bool
|
DirIV bool
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,8 @@ import (
|
|||||||
|
|
||||||
type FS struct {
|
type FS struct {
|
||||||
*cryptfs.CryptFS
|
*cryptfs.CryptFS
|
||||||
pathfs.FileSystem // loopbackFileSystem, see go-fuse/fuse/pathfs/loopback.go
|
pathfs.FileSystem // loopbackFileSystem, see go-fuse/fuse/pathfs/loopback.go
|
||||||
args Args // Stores configuration arguments
|
args Args // Stores configuration arguments
|
||||||
// dirIVLock: Lock()ed if any "gocryptfs.diriv" file is modified
|
// dirIVLock: Lock()ed if any "gocryptfs.diriv" file is modified
|
||||||
// Readers must RLock() it to prevent them from seeing intermediate
|
// Readers must RLock() it to prevent them from seeing intermediate
|
||||||
// states
|
// states
|
||||||
@ -30,7 +30,7 @@ func NewFS(args Args) *FS {
|
|||||||
return &FS{
|
return &FS{
|
||||||
CryptFS: cryptfs.NewCryptFS(args.Masterkey, args.OpenSSL, args.PlaintextNames),
|
CryptFS: cryptfs.NewCryptFS(args.Masterkey, args.OpenSSL, args.PlaintextNames),
|
||||||
FileSystem: pathfs.NewLoopbackFileSystem(args.Cipherdir),
|
FileSystem: pathfs.NewLoopbackFileSystem(args.Cipherdir),
|
||||||
args: args,
|
args: args,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user